How to give access to specific users to specific buckets on AWS S3

In AWS S3, you might want to provide the access to selected users to selected buckets. To provide the specific permissions you need to add a custom policy in IAM.

Let’s learn,

How to give permission to specific users to specific bucket?

After bucket creation in S3, Navigate to IAM management console and click on “Policies > Create Policy > then select “Create Your Own Policy"

Fill the Policy Name and Description

Fill below JSON to the Policy Document

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "arn:aws:s3:::*"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::your-bucket-name",
                "arn:aws:s3:::your-bucket-name/*"
            ]
        }
    ]
}

In the above document, you can see that I have given access to list all the buckets – this is necessary, however I have given the full access on “your-bucket-name“.

After this, click on the “Validate Policy“. After successful validation click on “Create Policy“. After successful creation of Policy, attach the policy to specific users.

Tji

This is how you can grant access of S3 bucket to specific users.

Surya

Living in permanent beta mode: Learning, Improving & evolving. SPECIALTIES: Web Application Development, Digital Media, E-Commerce Solutions, SEO, CRM Solutions, Open Source Technologies, System Administration ( Linux ), VOIP Solutions, Cloud Computing, Web Security.

Share
Published by
Surya

Recent Posts

How to get the all the database and table sizes of MySQL or MariaDB?

If you are working with MySQL or MariaDB web server, sooner or later you will…

7 years ago

How to set or change default text editor for crontab in Linux?

To edit the crontab entries you use crontab -e. The command will check for the…

7 years ago

How to install Comodo SSL certificate with NGNIX web server?

Installation method for COMODO SSL Certificate If you have generated the CSR and purchased or…

7 years ago

How to add or change the password (passphrase) of OpenSSH key?

It's possible you have earlier generated a ssh key without password/ passphrase. Later you found…

7 years ago

How to find files on linux OS ( distributions )

If you are working on Linux OS, finding files effectively always a tricky part. Like…

7 years ago

How to create CSR ( Certificate Signing Request ) for new SSL or to renew SSL?

What is SSL? SSL (Secure Sockets Layer) is a standard security protocol for establishing encrypted…

7 years ago