Month: May 2021

How can I whitelist IPs for API Gateway?

As you may know, AWS publishes its current IP address ranges in JSON format. So there is a workaround that you can whitelist the IP CIDR ranges used by API Gateway from the public AWS IP ranges. For example you can download the json file which includes all current IP address ranges of AWS. Then you need to filter the…

Read More »

API GW: Binary Media Support and Content Encoding

// request If the specified content-type header is listed/ matched under BinaryMediaTypes, the payload is accepted and transformed based on the ContentHandling. Otherwise, a 415 unsupported media type is returned. // response If the specified Accept header is listed/ matched under BinaryMediaTypes, the binary data will be returned after the ContentHandling transformation. // base64 Note that base64 encoded data is…

Read More »

Grant Internet access to a Lambda function

You can read this AWS official documentation and see my notes as following. With my understanding, the flow seems: Lambda function –> private subnet –> NAT Gateway –> public subnet –> Internet Gateway With above flow, it could help to understand and config it. PS: public subnet & private subnet A public subnet is a subnet that’s associated with a…

Read More »