Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Choose your framework/language

Page updated Oct 11, 2024

Tagging resources

Tags are a key-value pair that are applied to AWS resources to hold metadata. Tags are often used to decorate resources with metadata that helps categorize resources for billing or viewing purposes. Learn more about tags by visiting the AWS documentation for best practices for tagging resources.

Amplify applies the following tags by default:

Deployment typeTag keyTag value
sandboxcreated-byamplify
sandboxamplify:deployment-typesandbox
branchcreated-byamplify
branchamplify:deployment-typebranch
branchamplify:app-id<your-amplify-app-id>
branchamplify:branch-name<your-git-branch-name>

In your Amplify backend you can use the Tags class from the AWS Cloud Development Kit (CDK) to apply tags at the root level, which then cascades to child resources.

amplify/backend.ts
import { Tags } from 'aws-cdk-lib';
import { defineBackend } from '@aws-amplify/backend';
import { auth } from './auth/resource';
import { data } from './data/resource';
/**
* @see https://docs.amplify.aws/react/build-a-backend/ to add storage, functions, and more
*/
const backend = defineBackend({
auth,
data
});
const tags = Tags.of(backend.stack);
// add a new tag
tags.add('my-key', 'my-value');
// remove tags
tags.remove('my-key');