-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/local/start-apisam local start-api commandsam local start-api commandstage/prHas a PR ready for reviewHas a PR ready for reviewtype/bug
Description
Description:
I created a project using SAM CLI v1.33.0 with Runtime: nodejs14.x. When running on my local machine using sam local start-api the routeKey in event object has angle brackets e.g. GET /projects/ while after deploying on AWS the routeKey in event object has curly brackets e.g. GET /projects/{id} . I am using the routeKey for access control.
Another similar issue which I noticed is, when running local I get "queryStringParameters": {}, (key with blank object) while after deploying to AWS, the key is not present.
Steps to reproduce:
- Create a sample project using sam init
- Set up an API endpoint with custom field in URL. e.g. project/{project_id}
- Deploy the same to AWS
- Compare event object for both
Observed result:
- routeKey has angle brackets instead of curly brackets
- "queryStringParameters": {}, on local but when deployed on AWS, this key is missing
Expected result:
Should have curly brackets in routeKey
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Windows 10
sam --version: 1.33.0- AWS region: ca-central-1
Add --debug flag to command you are running
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/local/start-apisam local start-api commandsam local start-api commandstage/prHas a PR ready for reviewHas a PR ready for reviewtype/bug