Created
August 30, 2023 19:15
-
-
Save sanju2/0ba05a7c005f0f5d22066135b1b1bb55 to your computer and use it in GitHub Desktop.
Create Rest API using Lambda & ApiGateway - AWS Sinhalen Website
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def lambda_handler(event, context): | |
response = event["servicename"] | |
match event["servicename"]: | |
case "ec2": | |
response = "Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2's simple web service interface allows you to obtain and configure capacity with minimal friction." | |
case "s3": | |
response = "Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and performance." | |
case _: | |
response = "Service Incorrect" | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment