Tag your resources - Amazon Batch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Tag your resources

You can tag new or existing Amazon Batch compute environments, jobs, job definitions, job queues, and scheduling policies.

If you're using the Amazon Batch console, you can apply tags to new resources when they are created or to existing resources at any time using the Tags tab on the relevant resource page.

If you're using the Amazon Batch API, the Amazon CLI, or an Amazon SDK, you can apply tags to new resources using the tags parameter on the relevant API action or to existing resources using the TagResource API action. For more information, see TagResource.

Some resource-creating actions enable you to specify tags for a resource when the resource is created. If tags cannot be applied during resource creation, the resource creation process fails. This ensures that resources you intended to tag on creation are either created with specified tags or not created at all. If you tag resources at the time of creation, you don't need to run custom tagging scripts after resource creation.

The following table describes the Amazon Batch resources that can be tagged, and the resources that can be tagged on creation.

Tag support for Amazon Batch resources
Resource Supports tags Supports tag propagation Supports tagging on creation (Amazon Batch API, Amazon CLI, Amazon SDK)

Amazon Batch compute environments

Yes

No. Compute environment tags do not propagate to any other resources. Tags for the resources are specified in the tags member of the computeResources object passed in the CreateComputeEnvironment API operation.

Yes

Amazon Batch jobs

Yes

Yes

Yes

Amazon Batch job definitions

Yes

No

Yes

Amazon Batch job queues

Yes

No

Yes

Amazon Batch scheduling policies

Yes

No

Yes