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
If you'd like use custom [API Gateway request templates](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-override-request-response-parameters.html), you can do so like so:
Note that if the client does not provide a `Content-Type` header in the request, [ApiGateway defaults to `application/json`](https://docs.aws.amazon.com/apigateway/latest/developerguide/integration-passthrough-behaviors.html).
317
+
293
318
#### Customize the Path Override in API Gateway
294
319
295
320
Added the new customization parameter that lets the user set a custom Path Override in API Gateway other than the `{bucket}/{object}`
@@ -348,6 +373,33 @@ custom:
348
373
349
374
This will translate for example `/s3/a/b/c` to `a/b/c.xml`
350
375
376
+
#### Customizing responses
377
+
378
+
You can get a simple customization of the responses by providing a template for the possible responses. The template is assumed to be `application/json`.
379
+
380
+
```yml
381
+
custom:
382
+
apiGatewayServiceProxies:
383
+
- s3:
384
+
path: /s3
385
+
method: post
386
+
action: PutObject
387
+
bucket:
388
+
Ref: S3Bucket
389
+
key: static-key.json
390
+
response:
391
+
template:
392
+
# `success` is used when the integration response is 200
393
+
success: |-
394
+
{ "message: "accepted" }
395
+
# `clientError` is used when the integration response is 400
396
+
clientError: |-
397
+
{ "message": "there is an error in your request" }
398
+
# `serverError` is used when the integration response is 500
399
+
serverError: |-
400
+
{ "message": "there was an error handling your request" }
0 commit comments