해당 정책을 설명하는 이름으로 사용자 지정 정책을 생성합니다. 정책 문서 필드에 이 정책이 실행을 허용하는 API가 포함된 코드를 작성합니다.
주: 다음 JSON 샘플에는 클라우드 디스커버리에 대한 권한이 포함되어 있습니다.
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"PermissionsNeededForDiscovery",
"Effect":"Allow",
"Action":[
"account:ListRegions",
"apigateway:GET",
"application-autoscaling:Describe*",
"autoscaling-plans:Describe*",
"autoscaling:Describe*",
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeLaunchConfigurations",
"cloudformation:Describe*",
"cloudformation:DescribeStack*",
"cloudformation:List*
"cloudwatch:Get*",
"cloudwatch:List*",
"config:ListDiscoveredResources",
"dynamodb:Describe*",
"dynamodb:DescribeTable",
"dynamodb:ListGlobalTables",
"dynamodb:ListTables",
"ec2:Describe*",
"ec2:ReportInstanceStatus",
"ecs:Describe*",
"ecs:List*",
"eks:Describe*",
"eks:List*",
"elasticache:Describe*",
"elasticache:List*",
"elasticfilesystem:Describe*",
"elasticloadbalancing:Describe*",
"lambda:Get*",
"lambda:List*",
"organizations:Describe*",
"organizations:DescribeOrganization",
"organizations:List*",
"rds:Describe*",
"redshift:Describe*",
"route53:GetHostedZone",
"route53:List*",
"s3:GetAccountPublicAccessBlock",
"s3:GetBucket*",
"s3:GetBucketLocation",
"s3:List*",
"sdb:GetAttributes",
"sns:GetEndpointAttributes",
"sns:GetSubscriptionAttributes",
"sns:List*",
"sns:ListPlatformApplications",
"sns:ListSubscriptions",
"sns:ListSubscriptionsByTopic",
"sns:ListTopics",
],
"Resource":"*"
}
]
}
다음 JSON 샘플에는 클라우드 디스커버리 및 클라우드 프로비저닝 및 거버넌스에 대한 권한이 포함되어 있습니다. {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PermissionsNeededForCPG",
"Effect": "Allow",
"Action": [
"account:ListRegions",
"apigateway:GET",
"application-autoscaling:Describe*",
"autoscaling-plans:Describe*",
"autoscaling:Describe*",
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeLaunchConfigurations",
"cloudformation:Describe*",
"cloudformation:DescribeStack*",
"cloudwatch:Get*",
"cloudwatch:List*",
"config:ListDiscoveredResources"
"dynamodb:Describe*",
"dynamodb:DescribeTable",
"dynamodb:ListGlobalTables",
"dynamodb:ListTables",
"ec2:Describe*",
"ec2:ReportInstanceStatus",
"ecs:Describe*",
"ecs:List*",
"eks:Describe*",
"eks:List*",
"elasticache:Describe*",
"elasticache:List*",
"elasticfilesystem:Describe*",
"elasticloadbalancing:Describe*",
"lambda:Get*",
"lambda:List*",
"organizations:Describe*",
"organizations:DescribeOrganization",
"organizations:List*",
"rds:Describe*",
"redshift:Describe*",
"route53:GetHostedZone",
"route53:List*",
"s3:GetAccountPublicAccessBlock",
"s3:GetBucket*",
"s3:GetBucketLocation",
"s3:List*",
"sdb:GetAttributes",
"sns:GetEndpointAttributes",
"sns:GetSubscriptionAttributes",
"sns:List*",
"sns:ListPlatformApplications",
"sns:ListSubscriptions",
"sns:ListSubscriptionsByTopic",
"sns:ListTopics",
],
"Resource": "*"
},
{
"Sid": "MinimalPermissionsNeededForEc2ProvisioningThroughCloudFormation",
"Effect": "Allow",
"Action": [
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
"cloudformation:DeleteStack",
"cloudformation:DescribeStackEvents",
"cloudformation:DescribeStackResources",
"cloudformation:DescribeStacks",
"cloudformation:GetTemplate",
"cloudformation:GetTemplateSummary",
"cloudformation:List*",
"cloudformation:UpdateStack",
"cloudformation:ValidateTemplate"
"ec2:*",
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:DeleteObject",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject",
],
"Resource": "*"
}
]
}