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
Given a SAM template with the following configuration (partial):
Resources:Create-Condition:Type: AWS::Serverless::FunctionProperties:Runtime: go1.xHandler: mainCodeUri: .Events:Get-Condition:Type: ApiProperties:Path: /api/conditions/{id}Method: GET
When invoking the endpoint locally using SAM Local and Postman as follows:
localhost:3000/api/conditions/12345
The value of the ApiGatewayProxyRequest.Resource property ends up as "/api/conditions/12345". When invoking the same operation against the template deployed to AWS, you get what seems like the correct value of "/api/conditions/{id}".
This seems like a bug to me and an important one if you are routing to handlers based on the resource path.
The text was updated successfully, but these errors were encountered:
tfnaylor
changed the title
ApiGatewayProxyRequest.ResourcePath not properly set using SAM Local
ApiGatewayProxyRequest.Resource not properly set using SAM Local
Feb 1, 2018
Given a SAM template with the following configuration (partial):
When invoking the endpoint locally using SAM Local and Postman as follows:
localhost:3000/api/conditions/12345
The value of the ApiGatewayProxyRequest.Resource property ends up as "/api/conditions/12345". When invoking the same operation against the template deployed to AWS, you get what seems like the correct value of "/api/conditions/{id}".
This seems like a bug to me and an important one if you are routing to handlers based on the resource path.
The text was updated successfully, but these errors were encountered: