Skip to main content
All CollectionsActionsAmazon Web Services
Delete Elastic Beanstalk Application Versions Actions
Delete Elastic Beanstalk Application Versions Actions
Matt Houser avatar
Written by Matt Houser
Updated over 6 years ago

Description

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.

Test Mode

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.

Settings

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

Application Name

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

Version Label

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.

Test Mode

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:

  1. Version Label Comparison

  2. Minimum to Keep Per Application

  3. Older Than (days)

Amazon Commands Used

The following Amazon AWS commands are used. The access key should have permission to execute all of them.

  • elasticbeanstalk:DeleteApplicationVersions

  • elasticbeanstalk:DescribeApplications

  • elasticbeanstalk:DescribeApplicationVersions

  • elasticbeanstalk:DescribeEnvironments

  • s3:DeleteObject

  • s3:GetObject

  • s3:ListBucket

Did this answer your question?