# Amazon S3 Object Tagging

[Amazon S3 Object Tagging](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html) is a feature provided by Amazon Web Services in their Simple Storage Service. It's designed to help you categorize your storage. Cloudback supports S3 Object Tagging feature using custom HTTP headers for the [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) API call.

## Getting Started

### HTTP headers for S3 Object Tagging

**x-amz-tagging**: The tag-set for the object.

* The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1").

> **Important:** `s3:PutObjectTagging` permission is required. You should grant the permission at a bucket level and at an access point level if applicable.

Example:

```
x-amz-tagging: Key1=Value1&Key2=Value2
```

### Built-in variables

You can use the following variables in the `x-amz-tagging` header:

* `{{ context.RepositoryName }}`: The name of the repository that is being backed up.
* `{{ context.AccountName }}`: The name of the owner account of the repository that is being backed up.

Example:

```
x-amz-tagging: RepositoryName={{ context.RepositoryName }}&AccountName={{ context.AccountName }}
```

### Configure your storage in the Storage page

You can add a header using the [Storages Page](https://docs.cloudback.it/storage-configuration/customer-managed-storages). Click on the `Add a new storage` or `Edit Storage` button. Fill in the required details for the storage and you will see the `Additional HTTP headers` section. Add the `x-amz-tagging` header with the value you need.

![Custom HTTP headers](https://2781059148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQEI7SjBF2CddqNXZpCoE%2Fuploads%2Fgit-blob-11ff660041c5ff4a9d5aef70bf47a02ae652c07b%2Fs3-custom-headers.png?alt=media)

Additional HTTP headers are supported for all S3 compatible storages:

* Amazon S3 Bucket: Access Point
* Amazon S3 Bucket: Access Key
* OpenStack Swift Container: S3 API
* Wasabi S3 Bucket: Access Key

## Learn More

* External Article: [Categorizing your storage using tags](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)
* External Article: [PutObject Request Syntax](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax)
* [Amazon S3 Object Lock](https://docs.cloudback.it/security-and-compliance/amazon-s3-object-lock)
* [Customer Managed Storages](https://docs.cloudback.it/storage-configuration/customer-managed-storages)
