You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preferred way to pass `MessageAttribute` parameters is via a request body mapping template. Any `requestParameters` keys that begin with `integration.request.querystring.` will be automatically placed in the request body to maintain backward compatibility with existing implementations.
160
+
The alternative way to pass `MessageAttribute` parameters is via a request body mapping template.
161
161
162
162
#### Customizing request body mapping templates
163
163
@@ -714,7 +714,7 @@ Source: [How to connect SNS to Kinesis for cross-account delivery via API Gatewa
714
714
715
715
#### SQS
716
716
717
-
Customizing SQS request templates requires us to force all requests to use an `application/x-www-form-urlencoded` style body. The plugin sets the `Content-Type` to `application/x-www-form-urlencoded` for you, but API Gateway will still look for the template under the `application/json` request template type, so that is where you need to configure you request body in `serverless.yml`:
717
+
Customizing SQS request templates requires us to force all requests to use an `application/x-www-form-urlencoded` style body. The plugin sets the `Content-Type` header to `application/x-www-form-urlencoded` for you, but API Gateway will still look for the template under the `application/json` request template type, so that is where you need to configure you request body in `serverless.yml`:
718
718
719
719
```yml
720
720
custom:
@@ -742,6 +742,8 @@ Be careful when mixing additional `requestParameters` into your SQS endpoint as
742
742
743
743
Your custom template must also set the `Action` and `MessageBody` parameters, as these will not be added for you by the plugin.
744
744
745
+
When using a custom request body, headers sent by a client will no longer be passed through to the SQS queue (`PassthroughBehavior` is automatically set to `NEVER`). You will need to pass through headers sent by the client explicitly in the request body. Also, any custom querystring parameters in the `requestParameters` array will be ignored. These also need to be added via the custom request body.
746
+
745
747
#### SNS
746
748
747
749
Similar to the [Kinesis](#kinesis-1) support, you can customize the default request mapping templates in `serverless.yml` like so:
0 commit comments