Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.
Jedem Canary muss eine IAM-Rolle zugeordnet sein, der bestimmte Berechtigungen zugewiesen sind. Wenn Sie mit der CloudWatch Konsole einen Canary erstellen, können Sie CloudWatch Synthetics wählen, um eine IAM-Rolle für den Canary zu erstellen. Wenn Sie dies tun, verfügt die Rolle über die erforderlichen Berechtigungen.
Wenn Sie die IAM-Rolle selbst oder eine IAM-Rolle erstellen möchten, die Sie verwenden können, wenn Sie das AWS CLI oder verwenden, um einen Canary APIs zu erstellen, muss die Rolle die in diesem Abschnitt aufgeführten Berechtigungen enthalten.
Alle IAM-Rollen für Canarys müssen die folgende Vertrauensrichtlinienanweisung enthalten.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
Darüber hinaus muss die IAM-Rolle des Canary eine der folgenden Anweisungen enthalten.
Basic Canary, das keinen Amazon VPC-Zugriff verwendet AWS KMS oder benötigt
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::path/to/your/s3/bucket/canary/results/folder
"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::name/of/the/s3/bucket/that/contains/canary/results
"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup"
],
"Resource": [
"arn:aws:logs:canary_region_name
:canary_account_id
:log-group:/aws/lambda/cwsyn-canary_name
-*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"xray:PutTraceSegments"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Resource": "*",
"Action": "cloudwatch:PutMetricData",
"Condition": {
"StringEquals": {
"cloudwatch:namespace": "CloudWatchSynthetics"
}
}
}
]
}
Canary, AWS KMS das kanarische Artefakte verschlüsselt, benötigt aber keinen Amazon VPC-Zugriff
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::path/to/your/S3/bucket/canary/results/folder
"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::name/of/the/S3/bucket/that/contains/canary/results
"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup"
],
"Resource": [
"arn:aws:logs:canary_region_name
:canary_account_id
:log-group:/aws/lambda/cwsyn-canary_name
-*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"xray:PutTraceSegments"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Resource": "*",
"Action": "cloudwatch:PutMetricData",
"Condition": {
"StringEquals": {
"cloudwatch:namespace": "CloudWatchSynthetics"
}
}
},
{
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"kms:GenerateDataKey"
],
"Resource": "arn:aws:kms:KMS_key_region_name
:KMS_key_account_id
:key/KMS_key_id
",
"Condition": {
"StringEquals": {
"kms:ViaService": [
"s3.region_name_of_the_canary_results_S3_bucket
.amazonaws.com"
]
}
}
}
]
}
Canary, das Amazon VPC-Zugriff nicht verwendet, AWS KMS aber benötigt
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::path/to/your/S3/bucket/canary/results/folder
"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::name/of/the/S3/bucket/that/contains/canary/results
"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup"
],
"Resource": [
"arn:aws:logs:canary_region_name
:canary_account_id
:log-group:/aws/lambda/cwsyn-canary_name
-*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"xray:PutTraceSegments"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Resource": "*",
"Action": "cloudwatch:PutMetricData",
"Condition": {
"StringEquals": {
"cloudwatch:namespace": "CloudWatchSynthetics"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateNetworkInterface",
"ec2:DescribeNetworkInterfaces",
"ec2:DeleteNetworkInterface"
],
"Resource": [
"*"
]
}
]
}
Canary, AWS KMS das kanarische Artefakte verschlüsselt und außerdem Amazon VPC-Zugriff benötigt
Wenn Sie einen Nicht-VPC-Canary aktualisieren, um mit der Verwendung einer VPC zu beginnen, müssen Sie die Rolle des Canary aktualisieren, um die in der folgenden Richtlinie aufgeführten Netzwerkschnittstellenberechtigungen aufzunehmen.
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::path/to/your/S3/bucket/canary/results/folder
"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::name/of/the/S3/bucket/that/contains/canary/results
"
]
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:CreateLogGroup"
],
"Resource": [
"arn:aws:logs:canary_region_name
:canary_account_id
:log-group:/aws/lambda/cwsyn-canary_name
-*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets",
"xray:PutTraceSegments"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Resource": "*",
"Action": "cloudwatch:PutMetricData",
"Condition": {
"StringEquals": {
"cloudwatch:namespace": "CloudWatchSynthetics"
}
}
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateNetworkInterface",
"ec2:DescribeNetworkInterfaces",
"ec2:DeleteNetworkInterface"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"kms:GenerateDataKey"
],
"Resource": "arn:aws:kms:KMS_key_region_name
:KMS_key_account_id
:key/KMS_key_id
",
"Condition": {
"StringEquals": {
"kms:ViaService": [
"s3.region_name_of_the_canary_results_S3_bucket
.amazonaws.com"
]
}
}
}
]
}