Deleting a resource share in Amazon RAM - Amazon Resource Access Manager
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).

Deleting a resource share in Amazon RAM

You can delete a resource share at any time. When you delete a resource share, all principals that were associated with the resource share lose access to the shared resources. Deleting a resource share doesn't delete the shared resources.

To delete an Amazon resource

If you need to delete an Amazon resource that you included in a resource share, Amazon recommends that you first ensure that you either remove the resource from any resource share that includes it, or delete the resource share.

The deleted resource share remains visible in the Amazon RAM console for a short period after deletion, but its status changes to Deleted.

Console
To delete a resource share
  1. Open the Shared by me : Resource shares page in the Amazon RAM console.

  2. Because Amazon RAM resource shares exist in specific Amazon Web Services Regions, choose the appropriate Amazon Web Services Region from the dropdown list in the upper-right corner of the console. To see resource shares that contain global resources, you must set the Amazon Web Services Region to US East (N. Virginia), (us-east-1). For more information about sharing global resources, see Sharing Regional resources compared to global resources.

  3. Select the resource share you want to delete.

    Warning

    Be sure to select the correct resource share. You can't recover a resource share after you delete it.

  4. Choose Delete, then in the confirmation message, choose Delete.

  5. The deleted resource share disappears after two hours. Until then, it remains visible in the console with a deleted status.

Amazon CLI
To delete a resource share

You can use the delete-resource-share command to delete a resource share that you no longer need.

The following example first uses the get-resource-shares command to get the Amazon Resource Name (ARN) of the resource share that you want to delete. Then it uses delete-resource-share to delete the specified resource share.

$ aws ram get-resource-shares \ --region us-east-1 \ --resource-owner SELF { "resourceShares": [ { "resourceShareArn": "arn:aws-cn:ram:us-east-1:123456789012:resource-share/2ebe77d7-4156-4a93-87a4-228568d04425", "name": "MySubnetShare", "owningAccountId": "123456789012", "allowExternalPrincipals": true, "status": "ACTIVE", "creationTime": "2021-09-10T15:38:54.449000-07:00", "lastUpdatedTime": "2021-09-10T15:38:54.449000-07:00", "featureSet": "STANDARD" } ] } $ aws ram delete-resource-share \ --region us-east-1 \ --resource-share-arn arn:aws-cn:ram:us-east-1:123456789012:resource-share/2ebe77d7-4156-4a93-87a4-228568d04425 { "returnValue": true }