일반적인 앨리스우 유형에 대해 이러한 완전한 IAM 정책 템플릿을 사용하세요. 각각은 특정 리소스에 대한 액세스를 제한함으로써 최소 권한의 원칙을 따릅니다.
SQS 메시징 흐름
특정 대기열에 대한 액세스 제한:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sqs:SendMessage", "Resource": "arn:aws:sqs:us-west-2:123456789012:my-workflow-queue" }, { "Effect": "Allow", "Action": "sqs:GetQueueAttributes", "Resource": "arn:aws:sqs:us-west-2:123456789012:my-workflow-queue" } ]}us-west-2 지역으로, 123456789012 을 AWS 계정 ID로, my-workflow-queue 대기열 이름으로 바꾸세요.
EC2 관리 흐름
태그를 사용하여 특정 인스턴스에 대한 액세스 제한:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["ec2:DescribeInstances", "ec2:DescribeTags"], "Resource": "*" }, { "Effect": "Allow", "Action": [ "ec2:StopInstances", "ec2:StartInstances", "ec2:ModifyInstanceAttribute" ], "Resource": "arn:aws:ec2:us-east-1:123456789012:instance/*", "Condition": { "StringEquals": { "aws:ResourceTag/Environment": "production" } } } ]}이 정책은 Environment=production 있는 EC2 연결 태그만 중지/시작/수정하도록 허용합니다.
DynamoDB 흐름
특정 테이블에 대한 액세스 제한:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["dynamodb:Query", "dynamodb:GetItem", "dynamodb:PutItem"], "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/WorkflowData" } ]}WorkflowData 테이블 이름으로 바꾸세요.
시스템 관리자 흐름
특정 자동화 문서에 대한 액세스 제한:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["ssm:CreateDocument", "ssm:DeleteDocument"], "Resource": "arn:aws:ssm:us-east-1:123456789012:document/WorkflowAutomation-*" }, { "Effect": "Allow", "Action": ["ssm:StartAutomationExecution", "ssm:GetAutomationExecution"], "Resource": [ "arn:aws:ssm:us-east-1:123456789012:automation-definition/WorkflowAutomation-*:*", "arn:aws:ssm:us-east-1:123456789012:automation-execution/*" ] } ]}이는 자동화 문서를 WorkflowAutomation- 으로 접두사가 붙은 문서로 제한합니다.
API 게이트웨이 흐름
특정 API에 대한 액세스 제한:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["apigateway:GET", "apigateway:PUT"], "Resource": "arn:aws:apigateway:us-west-2::/restapis/abc123xyz/*" } ]}abc123xyz API Gateway ID로 바꾸세요.
추가 리소스
포괄적인 AWS 권한 참조:
- AWS 통합 관리 정책: 서비스별 AWS 권한의 전체 목록과 조정할 수 있는 CloudFormation 템플릿
- AWS API 폴링 설정: 추가 설정 패턴
중요
해당 리소스는 클라우드 통합(모니터링)을 위해 계정 ID 754728514883 을 사용합니다. 워크플로우 자동화의 경우 항상 253490767857 사용하세요.