

# The `awsApplication` tag


The `awsApplication` tag is a tag that AppRegistry vends when you create an AppRegistry application. This tag marks resources as belonging to an application. This tag consists of a key-value pair, where the key is `awsApplication` and value is the Amazon Resource Name (ARN) of an application. 

**To help you manage and monitor your applications, AWS highly recommends you ensure all of your application resources are tagged with the `awsApplication` tag**. Review [Tutorial: Existing AppRegistry application resources and the `awsApplication` tag](https://docs.aws.amazon.com/servicecatalog/latest/arguide/existing-customer-usecases.html) for instructions.

The `awsApplication` tag provides additional features and capabilities for your applications and resources, including: 
+ [Access to application monitoring and management](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/aws-myApplications.html#myApp-benefits) in myApplications dashboard in the AWS Management Console
+ Viewing details about your application's costs, security findings, alarms, metrics and usage 
+ Filtering by application in integrated AWS services, such as AWS Cost Explorer and AWS Security Hub CSPM 

For AppRegistry applications created before November 8th, 2023, AppRegistry creates the `awsApplication` tag after you perform your first resource association. You can then apply the `awsApplication` tag to any other resources you want to add to the application. For AppRegistry applications created after November 8th, 2023, AppRegistry creates the `awsApplication` tag when you create the application. 

As of September 18th, 2024 for **existing** AppRegistry users, the following behaviors apply: 
+ For existing AppRegistry applications which include resources without the `awsApplication` tag applied, AWS does not retroactively apply the tag. 
+ For existing AppRegistry applications, if you use the `AssociateResource` AppRegistry API, AWS does not automatically apply the tag unless you define the `options` parameter value as `APPLY_APPLICATION_TAG`. 
+ For existing AppRegistry applications, if you use the AppRegistry console to add a new resource to the application, AWS automatically applies the `awsApplication` tag to that new resource. 
+ For new applications created in the AppRegistry console, AWS automatically applies the `awsApplication` tag to all resources added to the application. 
+ For new applications created with myApplications in the AWS Management Console, AWS automatically applies the `awsApplication` tag to all resources added to the application. 

# Tutorial: Existing AppRegistry application resources and the `awsApplication` tag


If you have existing AppRegistry application, AWS recommends that you retroactively apply the `awsApplication` tag to all of the resources in the application, and also ensure any future resources added to the application have the `awsApplication` tag applied. This tutorial provides instructions for both recommendations. 

**Note**  
Managing an application's resources by adding or removing the `awsApplication` tag requires specific permissions. Review the minimum permissions for the AppRegistry APIs in the [https://docs.aws.amazon.com/servicecatalog/latest/dg/what-is-service-catalog.html](https://docs.aws.amazon.com/servicecatalog/latest/dg/what-is-service-catalog.html) and the Resource Groups APIs in the [https://docs.aws.amazon.com/ARG/latest/APIReference/Welcome.html](https://docs.aws.amazon.com/ARG/latest/APIReference/Welcome.html). 

## Apply the `awsApplication` tag to the resources in an existing application


In this situation, you have an existing AppRegistry application which includes resources that are *not* tagged with the `awsApplication` tag. The following procedure provides instructions to apply the `awsApplication` tag to those resources. 

**To tag an existing application's resources with the `awsApplication` tag:**

1. Identify the **application's tag value** (`awsApplication` tag value), which is expressed as an Amazon Resource Name (ARN).
   + Call the AppRegistry [`GetApplication` API](https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_GetApplication.html#API_app-registry_GetApplication_ResponseSyntax) and find the value in the `applicationTag` response parameter. 
   + Alternatively, you can navigate to the myApplications dashboard for the application and copy the `awsApplication` tag value from the [Application summary widget](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/myApp-app-dash.html#myApp-summary). 

1. After identifying the Application tag value, call the AppRegistry [`ListAssociatedResources` API](https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_ListAssociatedResources.html) to view a list of resources that are already in the application. 

1. Call the AppRegistry [`AssociateResource` API](https://docs.aws.amazon.com/servicecatalog/latest/dg/API_app-registry_AssociateResource.html) with the `options` parameter value as `APPLY_APPLICATION_TAG`. 

   **Example CLI command**:

   ```
   aws servicecatalog-appregistry associate-resource --application application_ARN 
                           --resource-type type --resource name --option "APPLY_APPLICATION_TAG"
   ```

## Add more resources to an existing application by applying the `awsApplication` tag


In this situation, you have an existing AppRegistry application to which you want to add new resources, and you want those resources to have the `awsApplication` tag applied. 

Use [myApplications in the AWS Management Console to add resources to an application](https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/myApp-manage-resources.html#myApp-add-resources). Resources added to the application using myApplications are automatically tagged with the `awsApplication` tag. 

You can also use the AWS Resource Groups [`GroupResources` API](https://docs.aws.amazon.com/ARG/latest/APIReference/API_GroupResources.html) to add resources to a specified group. The group is an application group, where the ARN is the `awsApplication` tag value. 

**To manually add resources to an application**: 

Call the Resource Groups `GroupResources` API and define the following parameters:
+ `Group` — The name or the Amazon resource name (ARN) of the application group to add resources to. 
+ `ResourceARNs` — The list of Amazon resource names (ARNs) of the resources to be added to the group. 

**Example CLI command**:

```
aws resourcegroups group-resources —-group "ApplicationGroup-ARN" —-resourceArns "Resource-ARNs"
```