Create S3 bucket
In this part, we will create two S3 buckets:
- Bucket book-image-stores: to store uploaded image
- Bucket book-image-resize-stores: to store iamge after resize
-
Open Amazon S3 console, then Click Create bucket
-
General configuration
- Choose Bucket type: General purpose
- Enter bucket name, book-image-stores
- Choose ACLs disabled
- 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-stores, repeat steps 1 to 5.
-
After creating the two buckets, we add the trigger for the lambda function created earlier
- Click Add Trigger
-
Enter S3 and select S3 service
-
Select bucket that trigger lambda, book-image-stores
- Select All objectcreate events for Event type
- Check the box - I acknowledge that using…. as shown below
- Click Add
-
Check result after add trigger for Lambda function