Region Based IAM Policy example

2023. 10. 18. 17:56AWS/AWS Identity and Access Management

728x90
SMALL

- 개요

서비스중이 아닌 타 region에서 발생하는 event나 생성되는 resource들은 모드 보안 사고나 불필요한 과금으로 이어진다. 따라서 사용하는 리전이 아닌 리전은 권한을 제어하는 것이 안전하다. 아래는 사용하는 리전(ap-northeast-1)을 제외한 모든 리전을 제어하는 AdministratorAccess Policy Example이다.

 

 

- AdministratorAccessOnlySeoul

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Action": [
				"cloudfront:*",
				"route53:*",
				"iam:*",
				"support:*",
				"access-analyzer:*",
				"route53domains:*",
				"sso:*",
				"sso-directory:*",
				"rolesanywhere:*",
				"rds-db:*",
				"elemental-support-cases:*",
				"elemental-support-content:*",
				"supportapp:*",
				"supportplans:*",
				"ce:*",
				"cur:*",
				"billing:*",
				"billingconductor:*",
				"aws-portal:*",
				"consolidatedbilling:*",
				"s3:*",
				"s3-object-lambda:*",
				"s3-outposts:*",
				"budgets:*",
				"organizations:*",
				"globalaccelerator:*",
				"directconnect:*",
				"fms:*",
				"waf:*",
				"waf-regional:*",
				"wafv2:*",
				"shield:*",
				"arc-zonal-shift:*",
				"route53-recovery-cluster:*",
				"route53-recovery-control-config:*",
				"route53-recovery-readiness:*",
				"route53resolver:*"
			],
			"Resource": "*",
			"Condition": {
				"StringEquals": {
					"aws:RequestedRegion": [
						"us-east-1"
					]
				}
			}
		},
		{
			"Effect": "Allow",
			"Action": "*",
			"Resource": "*",
			"Condition": {
				"StringEquals": {
					"aws:RequestedRegion": [
						"ap-northeast-2"
					]
				}
			}
		}
	]
}

 

 

- 비고

Global Based 서비스는 us-east-1에 권한을 주지 않으면 사용이 안되므로 us-east-1에서만 사용해야 하는 서비스느 따로 분류하였다.
AWS Identity and Access Management(IAM), AWS Organizations, Amazon CloudFront, Amazon Route53, AWS Global Accelerator, AWS Direct Connect, AWS Firewall Manager, AWS Web Application Firewall(WAF), AWS Shield, Amazon S3, AWS Cost Explorer, AWS Billing, AWS Budget

 

 

- 참고

https://happyengine.tistory.com/173

 

728x90
LIST