AWS - IAM

AWS Identity

AWS IAM Policy

AWS IAM Policy 종류

AWS IAM Policy (JSON Format)

{
	"Statement" : {
		"Effect": "Allow",
		"Principle": {
			...
		},
		"Action": [
			"ec2:*"
		],
		"Resource": [
			"*"
		],
		"Condition": {
			...
		}
	}
}
  • Effect: Allow, Deny
  • Principle
  • Action
    • 어떤 행위?
    • 예)
      • "Action": "iam:*AccessKey*"
  • Resource
    • 무엇을?
    • 예)
      • "Resource": "arn:aws:s3:DOC-EXAMPLE-BUCKET/*/test/*"
  • Condition
    • 조건
    • 예)
      • "Condition": { "{condition-operator}" : {  "{condition-key}" : "{condition-value}"  } }
{
	"Version" : "2012-10-17"
	"Statement" : [
		{
			"Sid": "DenyAllButProductManagers",
			"Effect": "Deny".
			"Principal" : {
				"AWS" : "*"
			},
			"Action" : [
				"s3:PutObject"
			],
			"Condition" : {
				"StringNotEquals" : {
					"aws:PrincipalTag/job-title": "Product-Manager"
				}
			}
		}
	]
}

AWS IAM Use Case




AWS Access Management


IAM Assume-role