How To Group Resources In AWS Using Tags

How To Group Resources In AWS Using Tags

How To Group Resources In AWS Using Tags

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In the last blog post, we have discussed the Parameter Store in AWS SSM.

https://cloudaffaire.com/how-to-create-parameter-store-in-aws-ssm/

In this blog post, we will discuss how to group resources in AWS using tags and AWS Resource Group service.

What Is AWS Resource Group:

You can use resource groups to organize your AWS resources. Resource groups make it easier to manage, monitor, and automate tasks on large numbers of resources at one time in the same AWS region. AWS Resource Groups provides two general methods for defining a resource group. Both methods involve using a query to identify the members of a group. The first method relies on tags applied to AWS resources to add resources to a group. The second method is based on resources available in an individual AWS CloudFormation stack.

What Can You Do With AWS Resource Group:

  1. You can integrate AWS Resource Group with AWS System Manager (SSM) to run commands, create automation workflows, create maintenance windows, create state manager, perform patching etc. on the resources under resource group.
  2. You can integrate AWS Resource Group with AWS CloudWatch to create a central monitoring dashboard for all your resources under the resource group.
  3. You can integrate AWS Resource Group with AWS Resource Access Manager (RAM) to share all the resources under your resource group at once with different accounts.

How To Group Resources In AWS Using Tags:

Requirements:

AWS CLI installed and configured. You can follow the below blog post to install and configure AWS CLI.

https://cloudaffaire.com/how-to-install-aws-cli/

https://cloudaffaire.com/how-to-configure-aws-cli/

Step 1: Create some AWS resources to add to the resources group.

Note: I am adding an EC2 instance with lots of custom configuration (Custom networking, LAMP stack, instance profile for SSM etc.) which is an overkill for this demo but will be required in upcoming demos if you want you can create few simple resources like an S3 bucket.

Step 2: Add tags to your AWS resources. We will create a tag-based resource group on tag “Key = Name, Value = MYAPP”.

Step 3: Create and manage AWS Resource Group using AWS CLI.

You can also view the resource group in the AWS Console under AWS System Manager.

Step 4: Cleanup.

Hope you have enjoyed this blog post, to get more details on AWS SSM, please refer below AWS documentation

https://docs.aws.amazon.com/systems-manager/index.html

 

Leave a Reply

Close Menu