The coding of the Python application
Let’s implement the application step by step.
Creating S3 buckets to store images
In this subsection, we are going to create an S3 bucket to hold images, which is uploaded via API Gateway. S3 will store the image and provide it whenever requested:
- Create a bucket and click the Create bucket button at the bottom of the page:
Figure 12.2 – An S3 bucket
- We filled in the Bucket name field as
python-book-image
; you can use whatever you want. After adding the bucket name, click Create bucket to create a new bucket:
Figure 12.3 – Bucket configuration
We have created an S3 bucket.
Creating Lambda code
In this subsection, we are going to implement a Lambda code that accepts the image upload request from API Gateway and stores the image in the S3 bucket:
- Create a Lambda function via the AWS Management Console. You can see the Function...