Skip to content

Instantly share code, notes, and snippets.

@landon9720
Created February 1, 2019 17:19
Show Gist options
  • Save landon9720/b8fd6945e1fe9d8bf539ead63ad64b53 to your computer and use it in GitHub Desktop.
Save landon9720/b8fd6945e1fe9d8bf539ead63ad64b53 to your computer and use it in GitHub Desktop.
DataDog AWS integration role defined by CloudFormation YAML
AWSTemplateFormatVersion: "2010-09-09"
Description: Role for DataDog integration
Parameters:
DataDogExternalId:
Type: "String"
Description: "See https://app.datadoghq.com/account/settings#integrations/amazon_web_services"
NoEcho: "true"
Resources:
DatadogAWSIntegrationRole:
Type: "AWS::IAM::Role"
Properties:
RoleName: "DatadogAWSIntegrationRole"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Action: "sts:AssumeRole"
Effect: "Allow"
Condition:
StringEquals:
"sts:ExternalId": !Ref DataDogExternalId
Principal:
AWS: "arn:aws:iam::464622532012:root"
Path: "/"
DatadogAWSIntegrationPolicy:
Type: "AWS::IAM::ManagedPolicy"
Properties:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Action:
- "autoscaling:Describe*"
- "cloudtrail:DescribeTrails"
- "cloudtrail:GetTrailStatus"
- "cloudwatch:Describe*"
- "cloudwatch:Get*"
- "cloudwatch:List*"
- "ec2:Describe*"
- "ec2:Get*"
- "ecs:Describe*"
- "ecs:List*"
- "elasticache:Describe*"
- "elasticache:List*"
- "elasticloadbalancing:Describe*"
- "elasticmapreduce:List*"
- "iam:Get*"
- "iam:List*"
- "kinesis:Get*"
- "kinesis:List*"
- "kinesis:Describe*"
- "logs:Get*"
- "logs:Describe*"
- "logs:TestMetricFilter"
- "rds:Describe*"
- "rds:List*"
- "route53:List*"
- "ses:Get*"
- "ses:List*"
- "sns:List*"
- "sns:Publish"
- "sqs:GetQueueAttributes"
- "sqs:ListQueues"
- "sqs:ReceiveMessage"
Effect: "Allow"
Resource: "*"
Path: "/"
Roles:
- !Ref "DatadogAWSIntegrationRole"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment