0
0
AWScloud~30 mins

REST API creation in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
REST API creation
📖 Scenario: You are building a simple REST API using AWS API Gateway and AWS Lambda. This API will respond to HTTP GET requests with a welcome message.
🎯 Goal: Create a REST API in AWS API Gateway with a GET method linked to a Lambda function that returns a welcome message.
📋 What You'll Learn
Create a Lambda function named WelcomeFunction with a basic handler.
Create an API Gateway REST API named WelcomeAPI.
Add a resource /welcome to the API.
Add a GET method to the /welcome resource linked to the Lambda function.
Deploy the API to a stage named prod.
💡 Why This Matters
🌍 Real World
REST APIs are commonly used to expose backend services to web and mobile applications. AWS API Gateway and Lambda provide a serverless way to build scalable APIs.
💼 Career
Understanding how to create and deploy REST APIs on AWS is a key skill for cloud engineers, backend developers, and DevOps professionals.
Progress0 / 4 steps
1
Create the Lambda function
Create a Lambda function named WelcomeFunction with a handler that returns a JSON response with status code 200 and body 'Welcome to the API!'. Use Python 3.12 runtime.
AWS
Need a hint?

Define the Lambda function resource with the correct runtime and handler. Also create an IAM role with Lambda execution permissions.

2
Create the API Gateway REST API and resource
Create an API Gateway REST API named WelcomeAPI. Add a resource with path part welcome to this API.
AWS
Need a hint?

Define the API Gateway REST API resource and add a child resource with path part 'welcome'.

3
Add GET method linked to Lambda
Add a GET method to the /welcome resource. Integrate this method with the Lambda function WelcomeFunction using AWS_PROXY integration.
AWS
Need a hint?

Add the GET method resource and integrate it with the Lambda function using AWS_PROXY.

4
Deploy the API to prod stage
Create a deployment for the API Gateway REST API WelcomeAPI and deploy it to a stage named prod.
AWS
Need a hint?

Create a deployment resource and a prod stage resource for the API Gateway REST API.