Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Essentials for AWS Cloud Developers

You're reading from   Python Essentials for AWS Cloud Developers Run and deploy cloud-based Python applications using AWS

Arrow left icon
Product type Paperback
Published in May 2023
Publisher Packt
ISBN-13 9781804610060
Length 224 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Serkan Sakinmaz Serkan Sakinmaz
Author Profile Icon Serkan Sakinmaz
Serkan Sakinmaz
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Python Installation and the Cloud
2. Chapter 1: Using Python on AWS FREE CHAPTER 3. Chapter 2: Creating an AWS Account 4. Part 2: A Deep Dive into AWS with Python
5. Chapter 3: Cloud Computing with Lambda 6. Chapter 4: Running Python Applications on EC2 7. Chapter 5: Running Python Applications with PyCharm 8. Chapter 6: Deploying Python Applications on Elastic Beanstalk 9. Part 3: Useful AWS Services to Implement Python
10. Chapter 7: Monitoring Applications via CloudWatch 11. Chapter 8: Database Operations with RDS 12. Chapter 9: Creating an API in AWS 13. Chapter 10: Using Python with NoSQL (DynamoDB) 14. Chapter 11: Using Python with Glue 15. Chapter 12: Reference Project on AWS 16. Index 17. Other Books You May Enjoy

Creating an API using API Gateway

We are going to create a simple API that accepts a request from a client. The API accepts two numbers, sums up two numbers in a Lambda function, and returns the calculated values. AWS Lambda is going to be implemented via Python. You can see the high-level flow in the following architecture:

Figure 9.2 – Data flow

We are going to start with the Lambda function creation. After the Lambda function creation, API Gateway is going to be set up with Lambda integration.

Let’s create the Lambda function step by step:

  1. Open the console and navigate to the AWS Lambda page:

Figure 9.3 – Lambda function

  1. Create a new Lambda function. Let’s name it SumUpLambda:

Figure 9.4 – Creating a new Lambda function

  1. Click Create function and wait a few seconds while the function is created:

Figure...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image