The Delete Elastic Beanstalk Application Versions action can be used to delete multiple versions from multiple Elastic Beanstalk Applications based on specific criteria. Possible criteria includes the application name, version name, or creation date.
For example, it can be used to:
- delete all versions
- delete all versions older than 7 days
- delete only versions that contain "test" in it's name.
This action includes a "test mode" as a way of determining which versions will be deleted without actually deleting the versions. This way, you can fine tune your action without concern for deleting the wrong versions. Test Mode is on by default.
When test mode is enabled, execute your action normally then check the action logs to verify that only versions that should have been deleted would have been deleted, and that versions that should not have been deleted would not have been deleted.
When you are satisfied, disable Test Mode.
Please see Common Action Settings for a description of settings common to all action types.
Application Identification Method
Method with which Elastic Beanstalk applications will be selected. Only those applications that match will have versions deleted. Possible options include:
- All Applications - Selects versions from all applications
- By Application Name - Selects versions only from applications that match an application name comparison
Specifies the application name to match.
Version Identification Method
Method with which versions will be selected selected. Only those versions that match will be deleted. Possible options include:
- All Versions - Can delete all versions
- By Version Label - Only versions that match a version label comparison may be deleted
Specifies the version label to match.
Minimum To Keep
Indicates the minimum number of versions to keep across all applications. Newer versions are favoured to keep over older versions.
Minimum To Keep Per Application
Indicates the minimum number of versions to keep from each applications. Newer versions are favoured to keep over older versions.
Older Than (days)
Optional. When enabled, only versions older than the specified number of days will be deleted.
Delete Versions from Amazon S3
When enabled, the corresponding bundle will be deleted from Amazon S3 along with the version.
Enables and disabled Test Mode (see above).
All versions are sorted by their creation date in descending order, then criteria are checked (when enabled) against each snapshot in the following order:
- Version Label Comparison
- Minimum to Keep Per Application
- Older Than (days)
Amazon Commands Used
The following Amazon AWS commands are used. The access key should have permission to execute all of them.