0
0
AWScloud~5 mins

Bucket policies for access control in AWS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a bucket policy in AWS S3?
A bucket policy is a set of rules in JSON format that defines who can access an S3 bucket and what actions they can perform on it.
Click to reveal answer
intermediate
How does a bucket policy differ from IAM policies?
Bucket policies are attached directly to an S3 bucket to control access to that bucket, while IAM policies are attached to users, groups, or roles to control their permissions across AWS services.
Click to reveal answer
beginner
What is the effect of the "Effect": "Deny" statement in a bucket policy?
It explicitly blocks the specified actions for the defined users or conditions, overriding any allow permissions.
Click to reveal answer
intermediate
Can bucket policies restrict access based on IP address?
Yes, bucket policies can include conditions to allow or deny access based on the requester's IP address or IP range.
Click to reveal answer
beginner
What happens if no bucket policy is attached to an S3 bucket?
By default, the bucket is private, and only the bucket owner has access unless permissions are granted through other means like IAM policies or ACLs.
Click to reveal answer
What does a bucket policy primarily control?
AWho can access the bucket and what actions they can perform
BThe physical location of the bucket
CThe cost of storing data in the bucket
DThe encryption method used for objects
Which JSON element in a bucket policy specifies whether access is allowed or denied?
AAction
BResource
CEffect
DPrincipal
Can a bucket policy grant access to all users on the internet?
ANo, bucket policies cannot grant public access
BOnly if the user has an AWS account
COnly if the bucket is encrypted
DYes, by setting Principal to "*"
Which condition can be used in a bucket policy to restrict access by IP address?
A"IpAddress"
B"StringEquals"
C"Bool"
D"NumericLessThan"
If a bucket policy denies access to a user, what happens if an IAM policy allows it?
AAccess is allowed because IAM policies have priority
BAccess is denied because deny overrides allow
CAccess is allowed only during business hours
DAccess is denied only if MFA is not used
Explain how bucket policies control access to an S3 bucket.
Think about rules that say who can do what with the bucket.
You got /4 concepts.
    Describe the difference between a bucket policy and an IAM policy.
    Consider where each policy is applied and what it controls.
    You got /4 concepts.