Creating simple hello world lambda that uses AWS Gateway API
First we will create AWS lambda and then configure our app to point to it via Gateway API.
Create AWS lambda using the following steps:-
Sign in to the Lambda console at https://console.aws.amazon.com/lambda.
1.Choose Create function. For Function name, enter my-function.
2. For all other options, use the default setting.
Choose Create function.
Gateway API
Configuring the API gateway is abit tricky. Goto https://console.aws.amazon.com/apigateway. And the click on "Create API".
Then select HTTP API and click on "build".
Provide a name, in this case we will call it "my-http-api" and add the required integration to lambda as shown here:-Then in the route settings, ensure you have setup the followings
In the define "stage", click "Next" and please verify the configuration is ok. Click "Create".
And then to test it out, go to API Gateway -> APIS -> "my-http-api". Then go to Deploy -> Stage and click on the Invoke URL. And you should the the following layout
Comments