Create S3 Bucket

In this part, we will create two S3 buckets:

  • book-image-stores-by-myself: Main bucket to store original images before processing
  • book-image-resize-stores-by-myself: Destination bucket to store images after resizing

Steps to Create Buckets

  1. Navigate to Amazon S3 Console and select Create bucket

S3 Console Homepage

  1. On the Create bucket page, configure the following:
    • In the General Configuration section:
      • Enter bucket name: book-image-stores-by-myself
    • In the Object Ownership section:
      • Select ACLs disabled for Object Ownership

Basic bucket configuration

  • In the Block Public Access settings section:
    • Uncheck Block all public access
    • Check the box I acknowledge that the current settings might result in this bucket and the objects within becoming public

Access permissions configuration

  1. Select Create bucket to complete the bucket creation process

Complete bucket creation

Repeat steps 1-3 to create the second bucket named book-image-resize-stores-by-myself

Configuring Lambda Trigger

  1. On the resize-image Lambda function page:
    • Select Add Trigger

Add trigger

  1. Search for and select the S3 service in the trigger list

Select S3 trigger

  1. On the trigger configuration page:
    • Select source bucket: book-image-stores-by-myself
    • Event type: Select All object create events
    • Check the confirmation box I acknowledge …
    • Select Add to complete

Configure S3 trigger

  1. Verify the trigger configuration result for the Lambda function

Confirm trigger configuration