Amazon SES의 자격 증명 정책 예제 - Amazon Simple Email Service

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Amazon SES의 자격 증명 정책 예제

자격 증명 권한 부여를 사용하면 자격 증명에 대한 API 작업을 허용하거나 거부할 세부 조건을 지정할 수 있습니다.

다음 예제는 API 작업의 다양한 측면을 제어하는 정책을 작성하는 방법을 보여줍니다.

보안 주체 지정

사용자가 권한을 부여하는 엔터티인 보안 주체는 AWS 계정 계정, AWS Identity and Access Management(IAM) 사용자 또는 동일한 계정에 속한 AWS 서비스일 수 있습니다.

다음 예제는 AWS ID 123456789012에 확인된 자격 증명 example.com(AWS 계정 123456789012 소유)을 제어하도록 허용하는 간단한 정책을 보여줍니다.

{ "Id":"SampleAuthorizationPolicy", "Version":"2012-10-17", "Statement":[ { "Sid":"AuthorizeMarketer", "Effect":"Allow", "Resource":"arn:aws:ses:us-east-1:123456789012:identity/example.com", "Principal":{ "AWS":[ "123456789012" ] }, "Action":[ "ses:DeleteEmailIdentity", "ses:PutEmailIdentityDkimSigningAttributes" ] } ] }

다음 정책 예제는 두 사용자에게 확인된 자격 증명 example.com을 제어할 수 있는 권한을 부여합니다. 사용자는 Amazon 리소스 이름(ARN)으로 지정됩니다.

{ "Id":"ExampleAuthorizationPolicy", "Version":"2012-10-17", "Statement":[ { "Sid":"AuthorizeIAMUser", "Effect":"Allow", "Resource":"arn:aws:ses:us-east-1:123456789012:identity/example.com", "Principal":{ "AWS":[ "arn:aws:iam::123456789012:user/John", "arn:aws:iam::123456789012:user/Jane" ] }, "Action":[ "ses:DeleteEmailIdentity", "ses:PutEmailIdentityDkimSigningAttributes" ] } ] }

작업 제한

권한을 부여하려는 제어 수준에 따라 자격 증명 권한 부여 정책에서 여러 가지 작업을 지정할 수 있습니다.

"BatchGetMetricData", "ListRecommendations", "CreateDeliverabilityTestReport", "CreateEmailIdentityPolicy", "DeleteEmailIdentity", "DeleteEmailIdentityPolicy", "GetDomainStatisticsReport", "GetEmailIdentity", "GetEmailIdentityPolicies", "PutEmailIdentityConfigurationSetAttributes", "PutEmailIdentityDkimAttributes", "PutEmailIdentityDkimSigningAttributes", "PutEmailIdentityFeedbackAttributes", "PutEmailIdentityMailFromAttributes", "TagResource", "UntagResource", "UpdateEmailIdentityPolicy"

또한 자격 증명 권한 부여 정책을 통해 보안 주체를 이러한 작업 중 하나로만 제한할 수 있습니다.

{ "Id":"ExamplePolicy", "Version":"2012-10-17", "Statement":[ { "Sid":"ControlAction", "Effect":"Allow", "Resource":"arn:aws:ses:us-east-1:123456789012:identity/example.com", "Principal":{ "AWS":[ "123456789012" ] }, "Action":[ "ses:PutEmailIdentityMailFromAttributes ] } ] }

복수의 설명문 사용

자격 증명 권한 부여 정책에는 여러 문이 포함될 수 있습니다. 다음의 정책 예제에는 문이 2개입니다. 첫 번째 문은 두 명의 사용자가 동일한 계정 123456789012sender@example.com에서 getemailidentity에 액세스하는 것을 거부합니다. 두 번째 문은 동일한 계정 123456789012 내에서 보안 주체 Jack에 대해 UpdateEmailIdentityPolicy를 거부합니다.

{ "Version":"2012-10-17", "Statement":[ { "Sid":"DenyGet", "Effect":"Deny", "Resource":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com", "Principal":{ "AWS":[ "arn:aws:iam::123456789012:user/John", "arn:aws:iam::123456789012:user/Jane" ] }, "Action":[ "ses:GetEmailIdentity" ] }, { "Sid":"DenyUpdate", "Effect":"Deny", "Resource":"arn:aws:ses:us-east-1:123456789012:identity/sender@example.com", "Principal":{ "AWS":"arn:aws:iam::123456789012:user/Jack" }, "Action":[ "ses:UpdateEmailIdentityPolicy" ] } ] }