Changing the AWS API Gateway response status code in SAM
When creating an API with AWS Lambda and Api Gateway, I discovered that a client request to a given resource with a verb that wasn't supported resulted in an unexpected response. You can see this from this curl command to the /test resource which is only defined for GET: $ curl -i -X PUT https://mh5rwr9q25.execute-api.eu-west-2.amazonaws.com/prod/test HTTP/2 403 content-type: application/json content-length: 42 {"message":"Missing Authentication Token"} Given that I can GET the /Prod/hello resource, I would not… continue reading.