How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway

As of September 2017, you no longer have to configure mappings to access the request body. All you need to do is check, “Use Lambda Proxy integration”, under Integration Request, under the resource. You’ll then be able to access query parameters, path parameters and headers like so event[‘pathParameters’][‘param1’] event[“queryStringParameters”][‘queryparam1’] event[‘requestContext’][‘identity’][‘userAgent’] event[‘requestContext’][‘identity’][‘sourceIP’]

S3 Static Website Hosting Route All Paths to Index.html

It’s very easy to solve it without url hacks, with CloudFront help. Create S3 bucket, for example: react Create CloudFront distributions with these settings: Default Root Object: index.html Origin Domain Name: S3 bucket domain, for example: react.s3.amazonaws.com Go to Error Pages tab, click on Create Custom Error Response: HTTP Error Code: 403: Forbidden (404: Not … Read more

Amazon CloudFront Latency

CloudFront attempts to fetch uncached content from the origin server in real time. There is no “replication delay” or similar issue because CloudFront is a pull-through CDN. Each CloudFront edge location knows only about your site’s existence and configuration; it doesn’t know about your content until it receives requests for it. When that happens, the … Read more

Increasing client_max_body_size in Nginx conf on AWS Elastic Beanstalk

There are two methods you can take for this. Unfortunately some work for some EB application types and some work for others. Supported/recommended in AWS documentation For some application types, like Java SE, Go, Node.js, and maybe Ruby (it’s not documented for Ruby, but all the other Nginx platforms seem to support this), Elasticbeanstalk has … Read more

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256

AWS4-HMAC-SHA256, also known as Signature Version 4, (“V4”) is one of two authentication schemes supported by S3. All regions support V4, but US-Standard¹, and many — but not all — other regions, also support the other, older scheme, Signature Version 2 (“V2”). According to http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html … new S3 regions deployed after January, 2014 will only … Read more