When you create a retention rule, you must specify the following required parameters:
-
The resource type to protect (snapshots or AMIs).
-
The type of retention rule (tag-level or Region-level). Tag-level rules protect only resources that have specific tags. Region-level rules protect all resources in the Region, but can exclude resources that have specific tags.
-
The retention period, which can be up to 1 year (365 days).
You can also optionally specify a rule name and description of up to 255 characters each, and tags to help you identify and organize your rules. We recommend that you do not include personally identifying, confidential, or sensitive information in the name, description, or tags.
You can also optionally lock Region-level retention rules on creation. If you lock a retention rule on creation, you must also specify the unlock delay period, which can be 7 to 30 days. Retention rules remain unlocked by default unless you explicitly lock them.
Note
Retention rules function only in the Regions in which they are created. If you intend to use Recycle Bin in other Regions, you must create additional retention rules in those Regions.
You can create a Recycle Bin retention rule using one of the following methods.
To create a tag-level retention rule
-
Open the Recycle Bin console at https://console.aws.amazon.com/rbin/home/
-
In the navigation pane, choose Retention rules, and then choose Create retention rule.
-
(Optional) For Retention rule name, enter a descriptive name for the retention rule.
-
(Optional) For Retention rule description, enter a brief description for the retention rule.
-
For Resource type, select the type of resource for the retention rule to protect. The retention rule will retain only resources of this type in the Recycle Bin.
-
For Select the resources to retain, choose Retain resources that have specific tags.
-
For Resource tags, enter the tag key and value pairs to use to identify the resources to retain in the Recycle Bin. Only resources of the specified type that have at least one of the specified tag will be retained by the retention rule.
-
For Retention period, enter the number of days to retain deleted resources in the Recycle Bin.
-
Choose Create retention rule.
To create a Region-level retention rule
-
Open the Recycle Bin console at https://console.aws.amazon.com/rbin/home/
-
In the navigation pane, choose Retention rules, and then choose Create retention rule.
-
(Optional) For Retention rule name, enter a descriptive name for the retention rule.
-
(Optional) For Retention rule description, enter a brief description for the retention rule.
-
For Resource type, select the type of resource for the retention rule to protect. The retention rule will retain only resources of this type in the Recycle Bin.
-
For Select the resources to retain, choose Retain all resources.
-
(Optional) To exclude resources that have specific tags, for Exclusion tags, enter up to five tag key and value pairs to use to identify the resources to exclude. Resources that have any of these tags are ignored by the retention rule.
-
For Retention period, enter the number of days to retain deleted resources in the Recycle Bin.
-
(Optional) To lock the retention rule, for Rule lock settings, select Lock, and then for Unlock delay period, specify the unlock delay period in days. A locked retention rule can't be modified or deleted. To modify or delete the rule, you must first unlock it and then wait for the unlock delay period to expire. For more information, see Lock a Recycle Bin retention rule to prevent it from being updated or deleted
To leave the retention rule unlocked, for Rule lock settings, keep Unlock selected. An unlocked retention rule can be modified or deleted at any time.
Note
You can't lock Region-level retention rules that have exclusion tags.
-
Choose Create retention rule.