AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

eb appversion

Description

Manages your Elastic Beanstalk application versions, including deleting a version of the application or creating the application version lifecycle policy. If you invoke the command without any options, it goes into interactive mode.

Use the --delete option to delete a version of the application.

Use the lifecycle option to display or create the application version lifecycle policy. Learn more at Configuring Application Version Lifecycle Settings

Syntax

eb appversion

eb appversion [-d | --delete] version-label

eb appversion lifecycle [-p | --print]

Options

Name

Description

-d version-label

or

--delete version-label

Delete version version-label of the application.

lifecycle

Invoke the default editor to create a new application version lifecycle policy. Use this policy to avoid hitting the limit to how many application versions you can create.

lifecycle -p

or

lifecycle --print

Display the current application lifecycle policy.

Common options

Using the command interactively

The command without any arguments displays the versions of the application, from most recent to oldest. See the Examples section for examples of what the screen looks like. Note the status line at the bottom of the display. It displays context-sensitive information that you can use to guide you.

Press d to delete an application version, press l to manage the lifecycle policy for your application, or press q to quit without making any changes.

Note

If the version is deployed to any environment, you cannot delete that version.

Output

The command with the --delete version-label option displays a message confirming that the application version was deleted.

Examples

The following example shows the interactive window for an application with no deployments.

The following example shows the interactive window for an application with the fourth version, with version label Sample Application, deployed.

The following example shows the output from an eb appversion lifecycle -p command, where ACCOUNT-ID is the user's account ID:

Copy
Application details for: lifecycle Region: sa-east-1 Description: Application created from the EB CLI using "eb init" Date Created: 2016/12/20 02:48 UTC Date Updated: 2016/12/20 02:48 UTC Application Versions: ['Sample Application'] Resource Lifecycle Config(s): VersionLifecycleConfig: MaxCountRule: DeleteSourceFromS3: False Enabled: False MaxCount: 200 MaxAgeRule: DeleteSourceFromS3: False Enabled: False MaxAgeInDays: 180 ServiceRole: arn:aws:iam::ACCOUNT-ID:role/aws-elasticbeanstalk-service-role