Delete an S3 Access Grants instance - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Delete an S3 Access Grants instance

You can delete an Amazon S3 Access Grants instance from an Amazon Web Services Region in your account. However, before you can delete an S3 Access Grants instance, you must first do the following:

Important

If you delete an S3 Access Grants instance, the deletion is permanent and can't be undone. All grantees that were given access through the grants in this S3 Access Grants instance will lose access to your S3 data.

You can delete an S3 Access Grants instance by using the Amazon S3 console, the Amazon Command Line Interface (Amazon CLI), the Amazon S3 REST API, and the Amazon SDKs.

To delete an S3 Access Grants instance
  1. Sign in to the Amazon Web Services Management Console and open the Amazon S3 console at https://console.amazonaws.cn/s3/.

  2. In the left navigation pane, choose Access Grants.

  3. On the S3 Access Grants page, choose the Region that contains the S3 Access Grants instance that you want to work with.

  4. Choose View details for the instance.

  5. On the instance details page, choose Delete instance in the upper-right corner.

  6. In the dialog box that appears, choose Delete. This action can't be undone.

To install the Amazon CLI, see Installing the Amazon CLI in the Amazon Command Line Interface User Guide.

To use the following example command, replace the user input placeholders with your own information.

Note

Before you can delete an S3 Access Grants instance, you must first delete all grants and locations created within the S3 Access Grants instance. If you have associated an IAM Identity Center center instance with your S3 Access Grants instance, you must disassociate it first.

Example – Delete an S3 Access Grants instance
aws s3control delete-access-grants-instance \ --account-id 111122223333 \ --profile access-grants-profile \ --region us-east-2 \ --endpoint-url https://s3-control.us-east-2.amazonaws.com \ // No response body

For information about the Amazon S3 REST API support for deleting an S3 Access Grants instance, see DeleteAccessGrantsInstance in the Amazon Simple Storage Service API Reference.

This section provides examples of how to delete an S3 Access Grants instance by using the Amazon SDKs.

To use the following example, replace the user input placeholders with your own information.

Java
Note

Before you can delete an S3 Access Grants instance, you must first delete all grants and locations created within the S3 Access Grants instance. If you have associated an IAM Identity Center center instance with your S3 Access Grants instance, you must disassociate it first.

Example – Delete an S3 Access Grants instance
public void deleteAccessGrantsInstance() { DeleteAccessGrantsInstanceRequest deleteRequest = DeleteAccessGrantsInstanceRequest.builder() .accountId("111122223333") .build(); DeleteAccessGrantsInstanceResponse deleteResponse = s3Control.deleteAccessGrantsInstance(deleteRequest); LOGGER.info("DeleteAccessGrantsInstanceResponse: " + deleteResponse); }