serverless-localstack icon indicating copy to clipboard operation
serverless-localstack copied to clipboard

API Gateway inconsistencies

Open rogueturnip opened this issue 5 years ago • 0 comments
trafficstars

So I'm working with the latest docker image for localstack and latest npm for serverless-localstack and I've noticed three issues with the API Gateway implementation that impact the ability to use it for local testing.

  1. Header parameter casing is changed. What I mean by this is if you send in something like X-USERID localstack converts this to X-Userid. In AWS it retains the casing
  2. Overlapping http paths are not predictable. I have 2 paths, /photos/{photoId} and /photos/upload. In AWS if I send in /photos/upload it will use the right one, with localstack it will sometimes use /photos/{photoId} for this and pass in "upload" s the photoId.
  3. s3 handler events do not get added to the s3 bucket. I created a lambda handler for s3:ObjectCreated:* and then used the cli to check if it was attached and it was not there. I could add this manually and it works as expected but the event in serverless.yml should also add it.

Thanks for the great work with this. It really moves closer to doing some solid testing before production deployment.

┆Issue is synchronized with this Jira Task by Unito

rogueturnip avatar Sep 19 '20 16:09 rogueturnip