Before you use IAM to manage access to Amazon S3, learn what IAM features are available to use with Amazon S3.
IAM feature | Amazon S3 support |
---|---|
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Yes | |
Partial | |
Yes | |
Yes | |
Yes | |
Partial |
To get a high-level view of how Amazon S3 and other AWS services work with most IAM features, seeAWS services that work with IAM in theIAM User Guide.
For more information about the permissions to S3 API operations by S3 resource types, seeRequired permissions for Amazon S3 API operations.
Supports identity-based policies: Yes
Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, seeDefine custom IAM permissions with customer managed policies in theIAM User Guide.
With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, seeIAM JSON policy elements reference in theIAM User Guide.
To view examples of Amazon S3 identity-based policies, seeIdentity-based policies for Amazon S3.
Supports resource-based policies: Yes
Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAMrole trust policies and Amazon S3bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You mustspecify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services.
To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource-based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, seeCross account resource access in IAM in theIAM User Guide.
The Amazon S3 service supportsbucket policies,access points policies, andaccess grants:
Bucket policies are resource-based policies that are attached to an Amazon S3 bucket. A bucket policy defines which principals can perform actions on the bucket.
Access point policies are resource-based polices that are evaluated in conjunction with the underlying bucket policy.
Access grants are a simplified model for defining access permissions to data in Amazon S3 by prefix, bucket, or object. For information about S3 Access Grants, seeManaging access with S3 Access Grants.
ThePrincipal
element specifies the user, account, service, or other entity that is either allowed or denied access to a resource. The following are examples of specifyingPrincipal
. For more information, seePrincipal in theIAM User Guide.
To grant permissions to an AWS account, identify the account using the following format.
"AWS":"account-ARN
"
The following are examples.
"Principal":{"AWS":"arn:aws:iam::AccountIDWithoutHyphens
:root"}
"Principal":{"AWS":["arn:aws:iam::AccountID1WithoutHyphens
:root","arn:aws:iam::AccountID2WithoutHyphens
:root"]}
The examples above grant permissions to the root user, which delegates permissions to the account level. However, IAM policies are still required on the specific roles and users in the account.
To grant permission to an IAM user within your account, you must provide an"AWS":"
name-value pair.user-ARN
"
"Principal":{"AWS":"arn:aws:iam::account-number-without-hyphens
:user/username
"}
For detailed examples that provide step-by-step instructions, seeExample 1: Bucket ownergranting its users bucket permissions andExample 3: Bucket ownergranting permissions to objects it does not own.
If an IAM identity is deleted after you update your bucket policy, the bucket policy will show a unique identifier in the principal element instead of an ARN. These unique IDs are never reused, so you can safely remove principals with unique identifiers from all of your policy statements. For more information about unique identifiers, seeIAM identifiers in theIAM User Guide.
Use caution when granting anonymous access to your Amazon S3 bucket. When you grant anonymous access, anyone in the world can access your bucket. We highly recommend that you never grant any kind of anonymous write access to your S3 bucket.
To grant permission to everyone, also referred as anonymous access, you set the wildcard ("*"
) as thePrincipal
value. For example, if you configure your bucket as a website, you want all the objects in the bucket to be publicly accessible.
"Principal":"*"
"Principal":{"AWS":"*"}
Using"Principal": "*"
with anAllow
effect in a resource-based policy allows anyone, even if they’re not signed in to AWS, to access your resource.
Using"Principal" :{ "AWS" : "*" }
with anAllow
effect in a resource-based policy allows any root user, IAM user, assumed-role session, or federated user in any account in the same partition to access your resource.
For anonymous users, these two methods are equivalent. For more information, seeAll principals in theIAM User Guide.
You cannot use a wildcard to match part of a principal name or ARN.
In AWS access control policies, the Principals "*" and{"AWS": "*"} behave identically.
You can also use resource policy to restrict access to resources that would otherwise be available to IAM principals. Use aDeny
statement to prevent access.
The following example blocks access if a secure transport protocol isn’t used:
Using"Principal": "*"
so that this restriction applies to everyone is a best practice for this policy, instead of attempting to deny access only to specific accounts or principals using this method.
You can require that your users access your Amazon S3 content only by using CloudFront URLs instead of Amazon S3 URLs. To do this, create a CloudFront origin access control (OAC). Then, change the permissions on your S3 data. In your bucket policy, you can set CloudFront as the Principal as follows:
"Principal":{"Service":"cloudfront.amazonaws.com"}
Use aCondition
element in the policy to allow CloudFront to access the bucket only when the request is on behalf of the CloudFront distribution that contains the S3 origin.
"Condition":{ "StringEquals":{ "AWS:SourceArn": "arn:aws:cloudfront::111122223333
:distribution/CloudFront-distribution-ID
" } }
For more information about requiring S3 access through CloudFront URLs, seeRestricting access to an Amazon Simple Storage Service origin in theAmazon CloudFront Developer Guide. For more information about the security and privacy benefits of using Amazon CloudFront, seeConfiguring secure access and restricting access to content.
To view policy examples for Amazon S3 buckets, seeBucket policies for Amazon S3.
To view policy examples for access points, seeConfiguring IAM policies for using access points.
Supports policy actions: Yes
Administrators can use AWS JSON policies to specify who has access to what. That is, whichprincipal can performactions on whatresources, and under whatconditions.
TheAction
element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such aspermission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are calleddependent actions.
Include actions in a policy to grant permissions to perform the associated operation.
The following shows different types of mapping relationship between S3 API operations and the required policy actions.
One-to-one mapping with the same name. For example, to use thePutBucketPolicy
API operation, thes3:PutBucketPolicy
policy action is required.
One-to-one mapping with different names. For example, to use theListObjectsV2
API operation, thes3:ListBucket
policy action is required.
One-to-many mapping. For example, to use theHeadObject
API operation, thes3:GetObject
is required. Also, when you use S3 Object Lock and want to get an object's Legal Hold status or retention settings, the correspondings3:GetObjectLegalHold
ors3:GetObjectRetention
policy actions are also required before you can use theHeadObject
API operation.
Many-to-one mapping. For example, to use theListObjectsV2
orHeadBucket
API operations, thes3:ListBucket
policy action is required.
To see a list of Amazon S3 actions for use in policies, seeActions defined by Amazon S3 in theService Authorization Reference. For a complete list of Amazon S3 API operations, seeAmazon S3 API Actions in theAmazon Simple Storage Service API Reference.
For more information about the permissions to S3 API operations by S3 resource types, seeRequired permissions for Amazon S3 API operations.
Policy actions in Amazon S3 use the following prefix before the action:
s3
To specify multiple actions in a single statement, separate them with commas.
"Action": [ "s3:action1
", "s3:action2
" ]
Bucket operations are S3 API operations that operate on the bucket resource type. For example,CreateBucket
,ListObjectsV2
, andPutBucketPolicy
. S3 policy actions for bucket operations require theResource
element in bucket policies or IAM identity-based policies to be the S3 bucket type Amazon Resource Name (ARN) identifier in the following example format.
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket
"
The following bucket policy grants the user
with accountAkua
the12345678901
s3:ListBucket
permission to perform theListObjectsV2 API operation and list objects in an S3 bucket.
Permissions granted in an access point for general purpose buckets policy are effective only if the underlying bucket allows the same permissions. When you use S3 Access Points, you must delegate access control from the bucket to the access point or add the same permissions in the access point policies to the underlying bucket's policy. For more information, seeConfiguring IAM policies for using access points. In access point policies, S3 policy actions for bucket operations require you to use the access point ARN for theResource
element in the following format.
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point
"
The following access point policy grants the user
with accountAkua
the12345678901
s3:ListBucket
permission to perform theListObjectsV2 API operation through the S3 access point named
. This permission allowsexample-access-point
to list the objects in the bucket that's associated withAkua
.example-access-point
Not all bucket operations are supported by access points for general purpose buckets. For more information, seeAccess points compatibility with S3 operations.
Permissions granted in an access points for directory buckets policy are effective only if the underlying bucket allows the same permissions. When you use S3 Access Points, you must delegate access control from the bucket to the access point or add the same permissions in the access point policies to the underlying bucket's policy. For more information, seeConfiguring IAM policies for using access points for directory buckets. In access point policies, S3 policy actions for bucket operations require you to use the access point ARN for theResource
element in the following format.
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point--usw2-az1--xa-s3
"
The following access point policy grants the user
with accountAkua
the12345678901
s3:ListBucket
permission to perform theListObjectsV2 API operation through the access point named
. This permission allowsexample-access-point--usw2-az1--xa-s3
to list the objects in the bucket that's associated withAkua
.example-access-point--usw2-az1--xa-s3
{ "Version":"2012-10-17", "Statement": [{ "Sid": "AllowAkuaToListObjectsInTheBucketThroughAccessPoint", "Effect": "Allow", "Principal":{ "AWS": "arn:aws:iam::111122223333:user/Akua" }, "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3express:us-east-1:111122223333:accesspoint/example-access-point-usw2-az1-xa-s3" } ]}
Not all bucket operations are supported by access points for directory buckets. For more information, seeObject operations for access points for directory buckets.
Object operations are S3 API operations that act upon the object resource type. For example,GetObject
,PutObject
, andDeleteObject
. S3 policy actions for object operations require theResource
element in policies to be the S3 object ARN in the following example formats.
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket
/*"
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket
/prefix
/*"
The object ARN must contain a forward slash after the bucket name, as seen in the previous examples.
The following bucket policy grants the user
with accountAkua
the12345678901
s3:PutObject
permission. This permission allows
to use thePutObject API operation to upload objects to the S3 bucket namedAkua
.amzn-s3-demo-bucket
When you use S3 Access Points to control access to object operations, you can use access point policies. When you use access point policies, S3 policy actions for object operations require you to use the access point ARN for theResource
element in the following format:arn:aws:s3:
. For object operations that use access points, you must include theregion
:account-id
:accesspoint/access-point-name
/object/resource
/object/
value after the whole access point ARN in theResource
element. Here are some examples.
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point
/object/*"
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point
/object/prefix
/*"
The following access point policy grants the user
with accountAkua
the12345678901
s3:GetObject
permission. This permission allows
to perform theGetObject API operation through the access point namedAkua
on all objects in the bucket that's associated with the access point.example-access-point
{ "Version":"2012-10-17", "Statement": [{ "Sid": "AllowAkua
to get objects through access point", "Effect": "Allow", "Principal":{ "AWS": "arn:aws:iam::111122223333
:user/Akua
" }, "Action": [ "s3:GetObject" ], "Resource": "arn:aws:s3:us-east-1
:111122223333
:accesspoint/example-access-point
/object/*" } ]}
Not all object operations are supported by access points. For more information, seeAccess points compatibility with S3 operations.
When you use access points for directory buckets to control access to object operations, you can use access point policies. When you use access point policies, S3 policy actions for object operations require you to use the access point ARN for theResource
element in the following format:arn:aws:s3:
. For object operations that use access points, you must include theregion
:account-id
:accesspoint/access-point-name
/object/resource
/object/
value after the whole access point ARN in theResource
element. Here are some examples.
"Resource": "arn:aws:s3express:us-west-2
:123456789012
:accesspoint/example-access-point--usw2-az1--xa-s3
/object/*"
"Resource": "arn:aws:s3express:us-west-2
:123456789012
:accesspoint/example-access-point--usw2-az1--xa-s3
/object/prefix
/*"
The following access point policy grants the user
with accountAkua
the12345678901
s3:GetObject
permission. This permission allows
to perform theGetObject API operation through the access point namedAkua
on all objects in the bucket that's associated with the access point.example-access-point--usw2-az1--xa-s3
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowAkua
to get objects through access point", "Effect": "Allow", "Principal":{ "AWS": "arn:aws:iam::12345678901
:user/Akua
" }, "Action": "s3express:CreateSession","s3:GetObject" "Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point--usw2-az1--xa-s3
/object/*" } ]}
Not all object operations are supported by access points for directory buckets. For more information, seeObject operations for access points for directory buckets.
Access point operations are S3 API operations that operate on theaccesspoint
resource type. For example,CreateAccessPoint
,DeleteAccessPoint
, andGetAccessPointPolicy
. S3 policy actions for access point operations can only be used in IAM identity-based policies, not in bucket policies or access point policies. Access points operations require theResource
element to be the access point ARN in the following example format.
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point
"
The following IAM identity-based policy grants thes3:GetAccessPointPolicy
permission to perform theGetAccessPointPolicy API operation on the S3 access point named
.example-access-point
When you use Access Points, to control access to bucket operations, seeBucket operations in policies for access points for general purpose buckets; to control access to object operations, seeObject operations in access point policies. For more information about how to configure access point policies, seeConfiguring IAM policies for using access points.
Access point for directory buckets operations are S3 API operations that operate on theaccesspoint
resource type. For example,CreateAccessPoint
,DeleteAccessPoint
, andGetAccessPointPolicy
. S3 policy actions for access point operations can only be used in IAM identity-based policies, not in bucket policies or access point policies. Access points for directory buckets operations require theResource
element to be the access point ARN in the following example format.
"Resource": "arn:aws:s3:us-west-2
:123456789012
:accesspoint/example-access-point--usw2-az1--xa-s3
"
The following IAM identity-based policy grants thes3express:GetAccessPointPolicy
permission to perform theGetAccessPointPolicy API operation on the access point named
.example-access-point--usw2-az1--xa-s3
{ "Version":"2012-10-17", "Statement": [{ "Sid": "GrantPermissionToRetrieveTheAccessPointPolicyOfAccessPointExampleAccessPointUsw2Az1XaS3", "Effect": "Allow", "Action": [ "s3express:CreateSession","s3express:GetAccessPointPolicy" ], "Resource": "arn:aws:s3:*:111122223333
:accesspoint/example-access-point
" } ]}
The following IAM identity-based policy grants thes3express:CreateAccessPoint
permission to create an access points for directory buckets.
{ "Version": "2012-10-17", "Statement": [{ "Sid": "Grant CreateAccessPoint.", "Principal": "*", "Action": "s3express:CreateSession", "s3express:CreateAccessPoint""Effect": "Allow", "Resource": "*" } ]}
The following IAM identity-based policy grants thes3express:PutAccessPointScope
permission to create access point scope for access points for directory buckets.
{ "Version": "2012-10-17", "Statement": [{ "Sid": "Grant PutAccessPointScope", "Principal": "*", "Action": "s3express:CreateSession", "s3express:CreateAccessPoint", "S3Express:PutAccessPointScope""Effect": "Allow", "Resource": "*", } ]}
When you use access points for directory buckets to control access to bucket operations, seeBucket operations in policies for access points for directory buckets; to control access to object operations, seeObject operations in policies for access points for directory buckets. For more information about how to configure access points for directory buckets policies, seeConfiguring IAM policies for using access points for directory buckets.
With Amazon S3 Object Lambda, you can add your own code to Amazon S3GET
,LIST
, andHEAD
requests to modify and process data as it is returned to an application. You can make requests through an Object Lambda Access Point, which works the same as making requests through other access points. For more information, seeTransforming objects with S3 Object Lambda.
For more information about how to configure policies for Object Lambda Access Point operations, seeConfiguring IAM policies for Object Lambda Access Points.
A Multi-Region Access Point provides a global endpoint that applications can use to fulfill requests from S3 buckets that are located in multiple AWS Region. You can use a Multi-Region Access Point to build multi-Region applications with the same architecture that's used in a single Region, and then run those applications anywhere in the world. For more information, seeManaging multi-Region traffic with Multi-Region Access Points.
For more information about how to configure policies for Multi-Region Access Point operations, seeMulti-Region Access Point policy examples.
(Batch Operations) job operations are S3 API operations that operate on the job resource type. For example,DescribeJob
andCreateJob
. S3 policy actions for job operations can only be used in IAM identity-based policies, not in bucket policies. Also, job operations require theResource
element in IAM identity-based policies to be thejob
ARN in the following example format.
"Resource": "arn:aws:s3:*:123456789012
:job/*"
The following IAM identity-based policy grants thes3:DescribeJob
permission to perform theDescribeJob API operation on the S3 Batch Operations job named
.example-job
For more information about how to configure S3 Storage Lens configuration operations, seeSetting Amazon S3 Storage Lens permissions.
Account operations are S3 API operations that operate on the account level. For example,GetPublicAccessBlock
(for account). Account isn't a resource type defined by Amazon S3. S3 policy actions for account operations can only be used in IAM identity-based policies, not in bucket policies. Also, account operations require theResource
element in IAM identity-based policies to be"*"
.
The following IAM identity-based policy grants thes3:GetAccountPublicAccessBlock
permission to perform the account-levelGetPublicAccessBlock API operation and retrieve the account-level Public Access Block settings.
To view examples of Amazon S3 identity-based policies, seeIdentity-based policies for Amazon S3.
To view examples of Amazon S3 resource-based policies, seeBucket policies for Amazon S3 andConfiguring IAM policies for using access points.
Supports policy resources: Yes
Administrators can use AWS JSON policies to specify who has access to what. That is, whichprincipal can performactions on whatresources, and under whatconditions.
TheResource
JSON policy element specifies the object or objects to which the action applies. Statements must include either aResource
or aNotResource
element. As a best practice, specify a resource using itsAmazon Resource Name (ARN). You can do this for actions that support a specific resource type, known asresource-level permissions.
For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources.
"Resource": "*"
Some Amazon S3 API actions support multiple resources. For example,s3:GetObject
accesses
andexample-resource-1
, so a principal must have permissions to access both resources. To specify multiple resources in a single statement, separate the ARNs with commas, as shown in the following example.example-resource-2
"Resource": [ "example-resource-1
", "example-resource-2
"
Resources in Amazon S3 are buckets, objects, access points, or jobs. In a policy, use the Amazon Resource Name (ARN) of the bucket, object, access point, or job to identify the resource.
To see a complete list of Amazon S3 resource types and their ARNs, seeResources defined by Amazon S3 in theService Authorization Reference. To learn with which actions you can specify the ARN of each resource, seeActions defined by Amazon S3.
For more information about the permissions to S3 API operations by S3 resource types, seeRequired permissions for Amazon S3 API operations.
You can use wildcard characters as part of the resource ARN. You can use the wildcard characters (*
and?
) within any ARN segment (the parts separated by colons). An asterisk (*
) represents any combination of zero or more characters, and a question mark (?
) represents any single character. You can use multiple*
or?
characters in each segment. However, a wildcard character can't span segments.
The following ARN uses the*
wildcard character in therelative-ID
part of the ARN to identify all objects in the
bucket.amzn-s3-demo-bucket
arn:aws:s3:::amzn-s3-demo-bucket
/*
The following ARN uses*
to indicate all S3 buckets and objects.
arn:aws:s3:::*
The following ARN uses both of the wildcard characters,*
and?
, in therelative-ID
part. This ARN identifies all objects in buckets such as
,amzn-s3-demo-example1bucket
,amzn-s3-demo-example2bucket
, and so on.amzn-s3-demo-example3bucket
arn:aws:s3:::amzn-s3-demo-example
?bucket
/*
You can use policy variables in Amazon S3 ARNs. At policy-evaluation time, these predefined variables are replaced by their corresponding values. Suppose that you organize your bucket as a collection of folders, with one folder for each of your users. The folder name is the same as the username. To grant users permission to their folders, you can specify a policy variable in the resource ARN:
arn:aws:s3:::bucket_name
/developers
/${aws:username}/
At runtime, when the policy is evaluated, the variable${aws:username}
in the resource ARN is substituted with the username of the person who is making the request.
To view examples of Amazon S3 identity-based policies, seeIdentity-based policies for Amazon S3.
To view examples of Amazon S3 resource-based policies, seeBucket policies for Amazon S3 andConfiguring IAM policies for using access points.
Supports service-specific policy condition keys: Yes
Administrators can use AWS JSON policies to specify who has access to what. That is, whichprincipal can performactions on whatresources, and under whatconditions.
TheCondition
element (orCondition
block) lets you specify conditions in which a statement is in effect. TheCondition
element is optional. You can create conditional expressions that usecondition operators, such as equals or less than, to match the condition in the policy with values in the request.
If you specify multipleCondition
elements in a statement, or multiple keys in a singleCondition
element, AWS evaluates them using a logicalAND
operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logicalOR
operation. All of the conditions must be met before the statement's permissions are granted.
You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, seeIAM policy elements: variables and tags in theIAM User Guide.
AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, seeAWS global condition context keys in theIAM User Guide.
Each Amazon S3 condition key maps to the same name request header allowed by the API on which the condition can be set. Amazon S3‐specific condition keys dictate the behavior of the same name request headers. For example, the condition keys3:VersionId
used to grant conditional permission for thes3:GetObjectVersion
permission defines behavior of theversionId
query parameter that you set in a GET Object request.
To see a list of Amazon S3 condition keys, seeCondition keys for Amazon S3 in theService Authorization Reference. To learn with which actions and resources you can use a condition key, seeActions defined by Amazon S3.
Suppose that Account A, represented by account ID
, owns a bucket. The Account A administrator wants to restrict123456789012
, a user in Account A, so thatDave
can upload objects to the bucket only if the object is stored in theDave
STANDARD_IA
storage class. To restrict object uploads to a specific storage class, the Account A administrator can use thes3:x-amz-storage-class
condition key, as shown in the following example bucket policy.
{ "Version":"2012-10-17", "Statement": [{ "Sid": "statement1", "Effect": "Allow", "Principal":{ "AWS": "arn:aws:iam::123456789012
:user/Dave
" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::amzn-s3-demo-bucket1/*", "Condition":{ "StringEquals":{ "s3:x-amz-storage-class": [ "STANDARD_IA" ] } } } ] }
In the example, theCondition
block specifies theStringEquals
condition that is applied to the specified key-value pair,"s3:x-amz-acl":["public-read"]
. There is a set of predefined keys that you can use in expressing a condition. The example uses thes3:x-amz-acl
condition key. This condition requires the user to include thex-amz-acl
header with valuepublic-read
in everyPutObject
request.
To view examples of Amazon S3 identity-based policies, seeIdentity-based policies for Amazon S3.
To view examples of Amazon S3 resource-based policies, seeBucket policies for Amazon S3 andConfiguring IAM policies for using access points.
Supports ACLs: Yes
In Amazon S3, access control lists (ACLs) control which AWS accounts have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format.
A majority of modern use cases in Amazon S3 no longer require the use of ACLs.
For information about using ACLs to control access in Amazon S3, seeManaging access with ACLs.
Supports ABAC (tags in policies): Partial
Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are calledtags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access.
ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome.
To control access based on tags, you provide tag information in thecondition element of a policy using theaws:ResourceTag/
,key-name
aws:RequestTag/
, orkey-name
aws:TagKeys
condition keys.
If a service supports all three condition keys for every resource type, then the value isYes for the service. If a service supports all three condition keys for only some resource types, then the value isPartial.
For more information about ABAC, seeDefine permissions with ABAC authorization in theIAM User Guide. To view a tutorial with steps for setting up ABAC, seeUse attribute-based access control (ABAC) in theIAM User Guide.
For information about resources that support ABAC in Amazon S3, seeUsing tags for attribute-based access control (ABAC).
To view example identity-based policies for limiting access to S3 Batch Operations jobs based on tags, seeControlling permissions for Batch Operations using job tags.
In ABAC policies, objects uses3:
tags instead ofaws:
tags. To control access to objects based on object tags, you provide tag information in theCondition element of a policy using the following tags:
s3:ExistingObjectTag/
tag-key
s3:RequestObjectTagKeys
s3:RequestObjectTag/
tag-key
For information about using object tags to control access, including example permission policies, seeTagging and access control policies.
Supports temporary credentials: Yes
Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, seeAWS services that work with IAM in theIAM User Guide.
You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, seeSwitch from a user to an IAM role (console) in theIAM User Guide.
You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, seeTemporary security credentials in IAM.
Supports forward access sessions (FAS): Yes
When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, seeForward access sessions.
FAS is used by Amazon S3 to make calls to AWS KMS to decrypt an object when SSE-KMS was used to encrypt it. For more information, seeUsing server-side encryption with AWS KMS keys (SSE-KMS).
S3 Access Grants also uses FAS. After you create an access grant to your S3 data for a particular identity, the grantee requests a temporary credential from S3 Access Grants. S3 Access Grants obtains a temporary credential for the requester from AWS STS and vends the credential to the requester. For more information, seeRequest access to Amazon S3 data throughS3 Access Grants.
Supports service roles: Yes
A service role is anIAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, seeCreate a role to delegate permissions to an AWS service in theIAM User Guide.
Changing the permissions for a service role might break Amazon S3 functionality. Edit service roles only when Amazon S3 provides guidance to do so.
Supports service-linked roles: Partial
A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles.
Amazon S3 supports service-linked roles for Amazon S3 Storage Lens. For details about creating or managing Amazon S3 service-linked roles, seeUsing service-linked roles for Amazon S3 Storage Lens.
Amazon S3 Service as a Principal
Service name in the policy | S3 feature | More information |
---|---|---|
| S3 Replication | |
| S3 event notifications | |
| S3 Inventory | |
| S3 Access Grants | |
| S3 Batch Operations | |
| S3 Server Access Logging | |
| S3 Storage Lens |