View a markdown version of this page

Delete AWS resource tags from a configuration - Amazon Simple Storage Service

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.

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/.

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

  3. Choose the dashboard, and then choose Edit.

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

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

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

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
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()); } } }