Work with Recycle Bin retention rules - Amazon EBS

Work with Recycle Bin retention rules

To enable and use Recycle Bin, you must create retention rules in the AWS Regions in which you want to protect your resources. Retention rules specify the following:

  • The resource type that you want to protect.

  • The resources that you want to retain in the Recycle Bin when they are deleted.

  • The retention period for which to retain resources in the Recycle Bin before they are permanently deleted.

With Recycle Bin, you can create two types of retention rules:

  • Tag-level retention rules — A tag-level retention rule uses resource tags to identify the resources that are to be retained in the Recycle Bin. For each retention rule, you specify one or more tag key and value pairs. Resources of the specified type that are tagged with at least one of the tag key and value pairs that are specified in the retention rule are automatically retained in the Recycle Bin upon deletion. Use this type of retention rule if you want to protect specific resources in your account based on their tags.

  • Region-level retention rules — A Region-level retention rule does not have any resource tags specified. It applies to all of the resources of the specified type in the Region in which the rule is created, even if the resources are not tagged. Use this type of retention rule if you want to protect all resources of a specific type in a specific Region.

After you create a retention rule, resources that match its criteria are automatically retained in the Recycle Bin for the specified retention period after they are deleted.