Write/Read access to S3 bucket from EC2 machine

Creation of the S3 bucket

  • Open the S3 buckets page:

  • Create the S3 bucket:

  • Block all public access to prevent public access:

Limit access to the S3 bucket (only an EC2 machine can access to it)

  • Create a policy for the S3 bucket

  • Specify permissions in the policy

  • Create a new role

  • Select EC2 as the trusted entity

  • Select the policy previously defined as permissions for the IAM role

Assign IAM role to EC2 machine

Last updated