Aws-sam-cli: HttpApi event.routeKey differs on local testing

Created on 31 Oct 2020  路  2Comments  路  Source: aws/aws-sam-cli

Description

When I run my HttpApi locally and console.log the event object my routeKey is /auth/login:POST, but when I do the same thing on AWS Lambda it says POST /auth/login.

Expected result

That the local output of event.routeKey also is POST /auth/login.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS Catalina (latest update)
  2. sam --version: 1.7.0

@awsjeffg

stagaccepted typbug

All 2 comments

Confirmed, here's a sample app that demonstrates the issue:

https://github.com/awsjeffg/gh-issue-2345

This has been released in v1.8.0, resolving

Was this page helpful?
0 / 5 - 0 ratings