AWS Lambda
AWS lambda functions are powerful way to host any simple functionality you want to expose if
- you know the function will not be accessed often
- You dont want to deployment on EC2 or EKS because it’s such a simple piece of code that it’s not worth the headache
For these reason you should choose to host on Lambda as an instance will be created by AWS only when the function is actually called from the client, this keeps your costs minimal, and can get you started immediately
API gateway
API gateway is a service provided by AWS which allows you to expose various resources in the AWS ecosystem as HTTP/ REST api’s. These can be public or Private (on internal network)
For us it is one of the best ways to expose our Lambda functions to the rest of the world.

These are the steps we need to follow to setup the AWS lambda and API gateway
- Create a simple Lambda function


- Add an API gateway trigger to it


- Create a REST api endpoint to it , (with CORS enabled)

- Deploy the endpoint by creating a new stage.
default