DEV Community

Cover image for HOW TO GENERATE AWS IAM POLICY FOR AN S3 BUCKET
SevimsOffice
SevimsOffice

Posted on

HOW TO GENERATE AWS IAM POLICY FOR AN S3 BUCKET

Securely accessing cloud resources is one of the most critical requirements for IT teams. To achieve this, cloud administrators leverage web services that assist with managing access to cloud environments.

AWS Policy Generator simplifies the process of creating policy documents for the Amazon Simple Queue Service (SQS), Amazon S3, VPC Endpoint Policy, the Amazon Simple Notification Service (SNS), and AWS Identity and Access Management (IAM).

Image description

Now, we are going to walk trough the AWS Policy Generator Service to Generate public access to an S3 Bucket called "mycanvapage".

First navigate to AWS Policy Generator . You will also have the link on your S3 Bucket Permissions Page.

Image description

There will be 3 steps to follow:

Step 1: Select Policy Type: We are going to create an S3 bucket policy. Therefore, Select S3 Bucket Policy.

Image description

Step 2: Add Statement(s): Effect will be "Allow". Click on Principal field and enter "*".

Image description

Click "-- Select Actions --" dropdown.

Image description

Click on "GetObject"

Image description

Click on the "Amazon Resource Name (ARN)" field. You will find your ARN number in your S3 bucket Details. Enter your ARN number which is similar to arn:aws:s3:::mycanvapage

Image description

And Click on Add Statement

Image description

Step 3: Generate Policy Now that the stament is ready Click on "Generate Policy"

Image description

Your policy will be generated:

Image description

You can now add your policy to your S3 Bucket and Save Changes.

Image description

Image description

Hope it was useful! See you in my next blog post!

Top comments (0)