-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Response Templates not Uploading to AWS (Bug?) #2170
Comments
By way of an update I have found that my template is applied to the default mapping. Is there a way to apply it to the following? .[400]. |
Can you please put your snippets in code blocks (i.e. surrounded by three back ticks "```") so that we can see your exact configuration - whitespace is significant in YAML, and might be why you're having problems. For more info, see the Github markdown page. |
Sure thing, that's done. |
Hi,
and my serverless configuration for this lambda function is
This is my
So, when i hitting lambda function i am getting
So, the mapping template is not working as expected ... |
Hi @chaitanya11 , the default integration type for lambda endpoints in Serverless is Lambda-Proxy. You are about to use the lambda integration type that uses templates, so you have to specify that in your serverless.yml:
For some info see here: https://serverless.com/framework/docs/providers/aws/events/apigateway/ |
This is a Bug Report
Description
I am trying to create a custom response template that gets uploaded in to AWS as integration responses. Currently I want the response to expose my error object as a content-type of application/json. What I've created doesn't seem to get uploaded into AWS, however writing the template directly in to AWS works.
config:
response-template.txt contains the following:
After a successful sls deploy and making the post request that fails I get the following which is my error object as a string
If I paste the template directly in to AWS I get the response formatted as I'd expect. It would appear, unless I am doing something wrong that the template is not being uploading into AWS.
The text was updated successfully, but these errors were encountered: