Confirm
, and then choose Launch template.event
. For the tag value, usespecialevent
. If you decide to customize the tagging, be sure to update lines 12 and 13 of the Lambda function code.AllowMonitoringAccountAccess
. For the role description, enterRole will allow read-only access to the monitoring account for building a CloudWatch dashboard
.{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": [
"arn:aws:iam::012345678912:role/AllowMonitoringAccountAccess"
]
}
]
}
Here is an example policy for more than one account:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": [
"arn:aws:iam::012345678912:role/AllowMonitoringAccountAccess",
"arn:aws:iam::987654321012:role/AllowMonitoringAccountAccess",
"arn:aws:iam::123456789123:role/AllowMonitoringAccountAccess"
]
}
]
}
CrossAccountDashboardDiscoveryPolicy
and optional description.{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "cloudwatch:PutDashboard",
"Resource": "arn:aws:cloudwatch::000111222333:dashboard/*"
}
]
}
CloudWatchDashboardCustomPolicy
and an optional description.{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:GetPolicyVersion",
"iam:GetPolicy"
],
"Resource": "arn:aws:iam::000111222333:policy/CrossAccountDashboardDiscoveryPolicy"
}
]
}
IAMCustomPolicy
and an optional description.AutomateCloudWatchDashboards
. For Runtime, choose Python 3.8.cwautomatedashboard.py
located at GitHub, and then choose Deploy.EventBridgeAutomateCloudWatchDashboards
. For Rule type, choose Schedule expression. You can enter the expression that best fits your use case. In this post, we use every 5 minutes.