Using only CLI commands, do the following:
- Create a new IAM User called
user_readonly_S3
- Tip:
aws iam create-user help
- Tip:
- Create a new Policy called
S3readOnly
that ALLOWS only S3 reads on every S3 resource. Take note of the created Policy ARN.- Tip 1: https://docs.aws.amazon.com/cli/latest/reference/iam/create-policy.html
- Tip 2, actions:
"s3:Get*" "s3:List*"
- Attach the policy to the user
- Tip:
attach-user-policy
command
- Tip:
- Create a new Access Key (and secret) for this new user.
- Configure a new AWS CLI profile called
s3ReadOnlyProfile
using the credentials from the previous step. - For checking the new user's permissions to S3, run the command below:
aws s3 ls --profile s3ReadOnlyProfile
No problem if you don't have S3 buckets created, the last CLI command above should not throw any error
-
README.md, based on the ANSWER.md file with a link to all files from your answer. The links are already in the ANSWER.md file, but if you have any additional files, include a link to it.
-
cli_commands.txt, include the command and output needed to execute the exercise above.