In order to pull AWS tags for an EC2 instance through the datadog agent follow these steps:
- Create a IAM role for the instance using this documentation
- For the policy section, specify the following permissions:
- Optional: add the security-groups tag by enabling this option
- Restart the agent
Note: This option will will not set tags like
availability_zone, region, or
instance_type, which are only available by pulling in the EC2 host through the AWS integration. This will only pull in the custom tags that have been set on the EC2 host under the "Tags" tab in your AWS console.