

# Delete AWS resource tags from a configuration

You remove tags from a configuration with the `UntagResource` operation, passing the configuration's ARN and the tag keys to remove. You can also remove tags by setting the `tags` parameter with `PutStorageLensConfiguration` to a tag set that omits the entries you want to remove, because that parameter replaces the entire tag set. You can delete resource tags by using the Amazon S3 console, the AWS CLI, or the AWS SDKs.

## Using the S3 console
<a name="s3-tables-storage-lens-delete-tags-console"></a>

In the Amazon S3 console, you remove a configuration's tags in the **General** step of the edit wizard.

**To remove tags from a configuration**

1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **Storage Lens**, and then choose the **Table buckets** tab.

1. Choose the dashboard, and then choose **Edit**.

1. In the **General** step, under **Tags - optional**, remove the tags that you no longer want.

1. Proceed through the remaining steps, and then on the **Review and create** step, choose **Submit**.

## Using the AWS CLI
<a name="s3-tables-storage-lens-delete-tags-cli"></a>

**Example**  
The following example command removes tags by key from an Amazon S3 Storage Lens for Tables configuration. To use this example, replace the `{{user input placeholders}}` with your own information.  

```
aws s3tables untag-resource --resource-arn={{arn:aws:s3tables:us-east-1:222222222222:storage-lens/your-configuration-id}} --tag-keys {{project}} {{department}}
```

## Using the AWS SDK for Java
<a name="s3-tables-storage-lens-delete-tags-sdk-java"></a>

The following example removes tags by key from an Amazon S3 Storage Lens for Tables configuration in SDK for Java. To use this example, replace the `{{user input placeholders}}` with your own information.

**Example – Delete tags from an Amazon S3 Storage Lens for Tables configuration**  

```Java
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3tables.S3TablesClient;
import software.amazon.awssdk.services.s3tables.model.UntagResourceRequest;

import java.util.List;

public class DeleteStorageLensTags {

    public static void main(String[] args) {
        String resourceArn = "{{arn:aws:s3tables:us-east-1:111122223333:storage-lens/your-configuration-id}}";

        try (S3TablesClient s3TablesClient = S3TablesClient.builder()
                .region(Region.{{US_EAST_1}})
                .build()) {

            s3TablesClient.untagResource(UntagResourceRequest.builder()
                    .resourceArn(resourceArn)
                    .tagKeys(List.of("{{key-1}}", "{{key-2}}"))
                    .build());
        }
    }
}
```