s3:TagResource

Tagging

s3:TagResource is a Tagging access-level action in the s3 service. Grants permission to add tags to the specified resource

Resource types

ARNs that s3:TagResource can be scoped to in an IAM policy.

arn:${Partition}:s3:${Region}:${Account}:access-grants/default/grant/${Token}
accessgrant
arn:${Partition}:s3:${Region}:${Account}:access-grants/default
accessgrantsinstance
arn:${Partition}:s3:${Region}:${Account}:access-grants/default/location/${Token}
accessgrantslocation
arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}
accesspoint
arn:${Partition}:s3:::${BucketName}
bucket
arn:${Partition}:s3:${Region}:${Account}:storage-lens-group/${Name}
storagelensgroup

Condition keys

Keys you can use in the Condition block of a policy that grants s3:TagResource.

aws:RequestTag/${TagKey} String

Filters access by the tags that are passed in the request

aws:ResourceTag/${TagKey} String

Filters access by the tags associated with the resource

aws:TagKeys ArrayOfString

Filters access by the tag keys that are passed in the request

s3:AccessPointNetworkOrigin String

Filters access by the network origin (Internet or VPC)

s3:AccessPointTag/${TagKey} String

Filters access by existing access point tag key and value

s3:BucketTag/${TagKey} String

Filters access by the tags associated with the bucket

s3:DataAccessPointAccount String

Filters access by the AWS Account ID that owns the access point

s3:DataAccessPointArn ARN

Filters access by an access point Amazon Resource Name (ARN)

Example IAM policy

A minimal policy that allows s3:TagResource. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowS3TagResource",
      "Effect": "Allow",
      "Action": "s3:TagResource",
      "Resource": "*"
    }
  ]
}

Related actions in s3

View all s3 actions →