Create S3 bucket
In this part, we will create two S3 buckets:
- Bucket book-image-store: to store uploaded image
- Bucket book-image-resize-store: to store iamge after resize
- Open Amazon S3 console
- Click Create bucket
- Enter bucket name, book-image-store
- Choose the region closest to you.
- Uncheck access block - Block all public access
- Check the box - I acknowledge that the current settings might result in this bucket and the objects within becoming public
- Click Create bucket
- To create bucket - book-image-resize-store, repeat steps 1 to 5.
- After creating the two buckets, we add the trigger for the lambda function created earlier
- Enter S3 and select S3 service
- Select bucket that trigger lambda, book-image-store
- Select All object create events for Event type
- Check the box - I acknowledge that using…. as shown below
- Click Add
- Check result after add trigger for Lambda function