Link Search Menu Expand Document

Build API Gateway with AWS Lambda

Table of contents

Understand api URL structure

  • BaseURL: https://a*****j.execute-api.eu-west-2.amazonaws.com
  • Stage: /test
  • Resources: /transactions
  • Request URL should be: https://a*****j.execute-api.eu-west-2.amazonaws.com[/test/transactions]

Using custom domain and import Cloudflare origin rsa pem:

For custom domain: add domain > click on mapping

If using custom domain and require a SSL certificate, you can download Cloudflare Origin RSA PEM.

Click here to download the root RSA, and paste the content in TXT editor and name the file as certificate chain

Required 4 items when creating AWS API gateway

  1. API gateway - Create methods for POST GET etc
  2. Lambda function - Node.js
  3. DynamoDB - Dynamic database for scaling, you also have other choices like mySQL etc
  4. IAM - Roles