File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -386,12 +386,7 @@ Sample syntax for EventBridge proxy in `serverless.yml`.
386386` ` ` yaml
387387custom:
388388 apiGatewayServiceProxies:
389- - eventbridge: # source and detailType is set to apigateway requestid by default
390- path: /eventbridge
391- method: post
392- eventBusName: { Ref: 'YourBusName' }
393- cors: true
394- - eventbridge: # source and detailType are hardcoded
389+ - eventbridge: # source and detailType are hardcoded; detail defaults to POST body
395390 path: /eventbridge
396391 method: post
397392 source: 'hardcoded_source'
@@ -407,6 +402,17 @@ custom:
407402 pathParam: sourceKey
408403 eventBusName: { Ref: 'YourBusName' }
409404 cors: true
405+ - eventbridge: # source, detail, and detailType as body parameters
406+ path: /eventbridge/{detailTypeKey}/{sourceKey}
407+ method: post
408+ detailType:
409+ bodyParam: data.detailType
410+ source:
411+ bodyParam: data.source
412+ detail:
413+ bodyParam: data.detail
414+ eventBusName: { Ref: 'YourBusName' }
415+ cors: true
410416
411417resources:
412418 Resources:
@@ -705,4 +711,4 @@ custom:
705711 "success": false,
706712 "errorMessage": "Client Error"
707713 }
708- ` ` `
714+ ` ` `
You can’t perform that action at this time.
0 commit comments