Amazon API Gateway Hands-On

Demo

In this demo, we will:

 

1. Create a Lambda function

2. Create an API Gateway REST API

3. Create a resource and method in API Gateway

4. Integrate the API method with Lambda

5. Deploy the API

6. Test the API

7. Clean up resources

Agenda

Demo Overview

Create Lambda function

HelloWorldFunction

Go to API Gateway

Create REST  API

HelloWorldAPI

Create resource

hello

We enable CORS to allow web applications hosted on different domains to securely access our API. Without CORS, web browsers block requests from a webpage to our API if they have different origins (domain, protocol, or port). Enabling CORS adds necessary HTTP headers to our API responses, telling browsers it's safe to allow these cross-origin requests. This is crucial for building web applications that need to interact with APIs hosted on separate domains.

Create method

Settings 

Deploy API

prod

Copy the URL

Paste in Browser Tab with /hello at the end 

Clean Up

Delete API

Delete Lambda  function

Delete IAM Role 

🙏

Thanks

for

Watching

Amazon API Gateway - Hands-On Demo

By Deepak Dubey

Amazon API Gateway - Hands-On Demo

Amazon API Gateway - Hands-On Demo

  • 133