Configure AWS s3 bucket user access
22 February 2025
Configure user access to aws s3 bucket. Then you can use aws cli to read/write data.
Configure access via IAM
- IAM is not IAM Identity Center
Create a user group
- always create user groups first and add users to these roles later
- it’s better than creating many users with duplicated permissions
- create user group
- do not choose any settings on this creation page.
- just click create group
add policy
- click on created user group
- change to tab Permissions
- add permissions > create inline policy
- change to json view
- paste the following:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ListObjectsInBucket", "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::<your_bucket_name>"] }, { "Sid": "AllObjectActions", "Effect": "Allow", "Action": "s3:*Object", "Resource": ["arn:aws:s3:::<your_bucket_name>/*"] } ] }
- click add/create (give name)
Create a user
- in IAM click users
- create user
- choose name
- keep AWS management console access unchecked (not needed for aws cli)
- add user to the group that was created before
- click next
- create user
create credentials
⚠️
AWS recommends an alternative way. See additional resource IAM identity center links at the bottom
- in IAM
- click on users
- select the user you want to create credentials for
- select tab security credentials
- scroll down to section Access keys
- click create access key
- choose use case command line interface (CLI)
Additional resources
Related content
CloudFront is a content delivery network by AWS. You can host your static websites there.
Create custom error page redirect for AWS CloudFront distribution to avoid ugly error pages.
Switching roles in AWS allows you to access and manage resources from different accounts within your organization without having to log in separately to each one.
I developed a serverless application that captures songs played on my favorite radio station, BrianFM. It also creates a Spotify playlist featuring songs from the past 24 hours.