AWS Elastic Beanstalk
Developer Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Tagging Saved Configurations

You can apply tags to your AWS Elastic Beanstalk saved configurations. Tags are key-value pairs associated with AWS resources. For information about Elastic Beanstalk resource tagging, use cases, tag key and value constraints, and supported resource types, see Tagging AWS Elastic Beanstalk Application Resources.

You can specify tags when you create a saved configuration. In an existing saved configuration, you can add or remove tags, and update the values of existing tags. You can add up to 50 tags to each saved configuration.

Adding Tags during Saved Configuration Creation

When you use the Elastic Beanstalk console to save a configuration, you can specify tag keys and values on the Save Configuration page.


        Save Configuration page in the Elastic Beanstalk console

If you use the EB CLI to save a configuration, use the --tags option with eb config to add tags.

~/workspace/my-app$ eb config --tags mytag1=value1,mytag2=value2

With the AWS CLI or other API-based clients, add tags by using the --tags parameter on the create-configuration-template command.

$ aws elasticbeanstalk create-configuration-template \ --tags Key=mytag1,Value=value1 Key=mytag2,Value=value2 \ --application-name my-app --template-name my-template --solution-stack-name solution-stack

Managing Tags of an Existing Saved Configuration

You can add, update, and delete tags in an existing Elastic Beanstalk saved configuration.

To manage a saved configuration's tags using the Elastic Beanstalk console

  1. Open the Elastic Beanstalk console.

  2. Select the application whose saved configuration you want to manage.

  3. In the side navigation pane, choose Saved configurations.

  4. Select the saved configuration to manage, and then choose Actions.

  5. Choose Manage tags.

    The Manage Tags dialog box shows the list of tags that are currently applied to the application version.

    
            Manage Tags dialog box shows tags for a saved configuration in the Elastic Beanstalk console
  6. Add, update, or delete tags:

    • To add a tag, enter it into the empty boxes at the bottom of the list.

    • To update a tag's key or value, edit the respective box in the tag's row.

    • To delete a tag, choose 
                Remove tag
              next to the tag's value box.

  7. Choose Apply.

If you use the EB CLI to update your saved configuration, use eb tags to add, update, delete, or list tags.

For example, the following command lists the tags in a saved configuration.

~/workspace/my-app$ eb tags --list --resource "arn:aws:elasticbeanstalk:us-east-2:my-account-id:configurationtemplate/my-app/my-template"

The following command updates the tag mytag1 and deletes the tag mytag2.

~/workspace/my-app$ eb tags --update mytag1=newvalue --delete mytag2 \ --resource "arn:aws:elasticbeanstalk:us-east-2:my-account-id:configurationtemplate/my-app/my-template"

For a complete list of options and more examples, see eb tags.

With the AWS CLI or other API-based clients, use the list-tags-for-resource command to list the tags of a saved configuration.

$ aws elasticbeanstalk list-tags-for-resource --resource-arn "arn:aws:elasticbeanstalk:us-east-2:my-account-id:configurationtemplate/my-app/my-template"

Use the update-tags-for-resource command to add, update, or delete tags in a saved configuration.

$ aws elasticbeanstalk update-tags-for-resource \ --tags-to-add Key=mytag1,Value=newvalue --tags-to-remove mytag2 \ --resource-arn "arn:aws:elasticbeanstalk:us-east-2:my-account-id:configurationtemplate/my-app/my-template"

Specify both tags to add and tags to update in the --tags-to-add parameter of update-tags-for-resource. A nonexisting tag is added, and an existing tag's value is updated.

Note

To use some of the EB CLI and AWS CLI commands with an Elastic Beanstalk saved configuration, you need the saved configuration's ARN. To construct the ARN, first use the following command to retrieve the saved configuration's name.

$ aws elasticbeanstalk describe-applications --application-names my-app

Look for the ConfigurationTemplates key in the command's output. This element shows the saved configuration's name. Use this name where my-template is specified in the commands mentioned on this page.