

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

# AWS SAM 템플릿에서 리소스 액세스 설정 및 관리
<a name="sam-permissions"></a>

 AWS 리소스가 서로 상호 작용하려면 리소스 간에 적절한 액세스 및 권한을 구성해야 합니다. 이렇게 하려면 안전한 방식으로 상호 작용을 수행하기 위해 AWS Identity and Access Management (IAM) 사용자, 역할 및 정책을 구성해야 합니다.

이 섹션의 주제는 모두 템플릿에 정의된 리소스에 대한 액세스를 설정하는 것과 관련이 있습니다. 이 섹션은 일반적인 모범 사례로 시작합니다. 다음 두 주제에서는 서버리스 애플리케이션에서 참조되는 리소스 간에 액세스 및 권한을 설정하기 위한 두 가지 옵션인 AWS SAM 커넥터와 AWS SAM 정책 템플릿을 검토합니다. 마지막 주제에서는가 사용자 관리에 CloudFormation 사용하는 것과 동일한 메커니즘을 사용하여 사용자 액세스를 관리하는 방법에 대한 세부 정보를 제공합니다.

자세한 내용은 *AWS CloudFormation 사용 설명서*의 [AWS Identity and Access Management를 사용한 액세스 제어](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html)를 참조하세요.

 AWS Serverless Application Model (AWS SAM)는 서버리스 애플리케이션에 대한 액세스 및 권한 관리를 간소화하는 두 가지 옵션을 제공합니다.

1. AWS SAM 커넥터

1. AWS SAM 정책 템플릿

## AWS SAM 커넥터
<a name="sam-permissions-intro-connectors"></a>

커넥터는 두 리소스 간에 권한을 프로비저닝하는 방법입니다. AWS SAM 템플릿에서 서로 상호 작용하는 방법을 설명하여이 작업을 수행합니다. `Connectors` 리소스 속성이나 `AWS::Serverless::Connector` 리소스 유형을 사용하여 정의할 수 있습니다. 커넥터는 AWS 리소스 조합 간의 데이터 `Read` 및 이벤트 프로비저닝 및 `Write` 액세스를 지원합니다. AWS SAM 커넥터에 대한 자세한 내용은 섹션을 참조하세요[AWS SAM 커넥터를 사용하여 리소스 권한 관리](managing-permissions-connectors.md).

## AWS SAM 정책 템플릿
<a name="sam-permissions-intro-policy-templates"></a>

AWS SAM 정책 템플릿은 템플릿에 AWS SAM 추가하여 AWS Lambda 함수, AWS Step Functions 상태 시스템 및 상호 작용하는 리소스 간의 액세스 및 권한을 관리할 수 있는 사전 정의된 권한 세트입니다. AWS SAM 정책 템플릿에 대한 자세한 내용은 섹션을 참조하세요[AWS SAM정책 템플릿](serverless-policy-templates.md).

## AWS CloudFormation 메커니즘
<a name="sam-permissions-intro-cloudformation"></a>

CloudFormation 메커니즘에는 AWS 리소스 간의 권한을 관리하기 위한 IAM 사용자, 역할 및 정책 구성이 포함됩니다. 자세한 내용은 [CloudFormation 메커니즘을 사용하여 AWS SAM 권한 관리](sam-permissions-cloudformation.md)를 참조하세요.

## 모범 사례
<a name="sam-permissions-intro-best-practices"></a>

서버리스 애플리케이션 전체에서 여러 방법을 사용하여 리소스 간에 권한을 구성할 수 있습니다. 따라서 각 시나리오에 가장 적합한 옵션을 선택하고 애플리케이션 전체에서 여러 옵션을 함께 사용할 수 있습니다. 가장 적합한 옵션을 선택할 때는 다음과 같은 몇 가지 고려할 사항이 있습니다.
+ AWS SAM 커넥터와 정책 템플릿은 모두 AWS 리소스 간의 안전한 상호 작용을 용이하게 하는 데 필요한 IAM 전문 지식을 줄입니다. 지원되는 경우 커넥터와 정책 템플릿을 사용하세요.
+ AWS SAM 커넥터는 간단하고 직관적인 간편 구문을 제공하여 AWS SAM 템플릿에서 권한을 정의하고 최소한의 IAM 전문 지식이 필요합니다. AWS SAM 커넥터와 정책 템플릿이 모두 지원되는 경우 AWS SAM 커넥터를 사용합니다.
+ AWS SAM 커넥터는 지원되는 AWS SAM 소스 `Read` 리소스와 대상 리소스 간에 데이터 및 이벤트를 프로비저닝하고 `Write` 액세스할 수 있습니다. 지원되는 리소스 유형 목록은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요. 지원되는 경우 AWS SAM 커넥터를 사용합니다.
+  AWS SAM 정책 템플릿은 Lambda 함수, Step Functions 상태 시스템 및 상호 작용하는 AWS 리소스 간의 권한으로 제한되지만 정책 템플릿은 모든 CRUD 작업을 지원합니다. 지원되는 경우 및 시나리오에 대한 AWS SAM 정책 템플릿을 사용할 수 있는 경우 AWS SAM 정책 템플릿을 사용합니다. 사용 가능한 정책 템플릿 목록은 [AWS SAM정책 템플릿](serverless-policy-templates.md) 섹션을 참조하세요.
+ 다른 모든 시나리오의 경우 또는 세분화가 필요한 경우 CloudFormation 메커니즘을 사용합니다.

# AWS SAM 커넥터를 사용하여 리소스 권한 관리
<a name="managing-permissions-connectors"></a>

커넥터는 서버리스 애플리케이션 리소스 간에 간단하고 범위가 잘 지정된 권한을 제공하는 AWS Serverless Application Model (AWS SAM) 추상 리소스 유형으로`AWS::Serverless::Connector`, 로 식별됩니다.

## AWS SAM 커넥터의 이점
<a name="connector-benefits"></a>

커넥터는 리소스 간에 적절한 액세스 정책을 자동으로 구성하여 AWS 권한 부여 기능, 정책 언어 및 서비스별 보안 설정에 대한 전문 지식 없이 서버리스 애플리케이션을 작성하고 애플리케이션 아키텍처에 집중할 수 있는 기능을 제공합니다. 따라서 커넥터는 서버리스 개발을 처음 접하는 개발자나 개발 속도를 높이려는 노련한 개발자에게 큰 도움이 됩니다.

## AWS SAM 커넥터 사용
<a name="what-are-connectors"></a>

`Connectors` 리소스 속성을 **소스** 리소스에 임베드하여 확인합니다. 그런 다음 **대상** 리소스를 정의하고 해당 리소스 간에 데이터 또는 이벤트가 흐르는 방식을 설명합니다. AWS SAM 그런 다음는 필요한 상호 작용을 용이하게 하는 데 필요한 액세스 정책을 구성합니다.

다음은 이 리소스 속성이 작성되는 방법에 대한 간략한 설명입니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  <source-resource-logical-id>:
    Type: <resource-type>
    ...
    Connectors:
      <connector-name>:
        Properties:
          Destination:
            <properties-that-identify-destination-resource>
          Permissions:
            <permission-types-to-provision>
  ...
```

## 커넥터 작동 방식
<a name="connectors-work"></a>

**참고**  
이 섹션에서는 커넥터가 보이지 않는 곳에서 필요한 리소스를 제공하는 방법을 설명합니다. 이는 커넥터를 사용할 때 자동으로 발생합니다.

먼저, 탑재된 `Connectors` 리소스 속성이 `AWS::Serverless::Connector`리소스 유형으로 변환됩니다. 논리 ID는 *<source-resource-logical-id><embedded-connector-logical-id>*로 자동 생성됩니다.

예를 들어 탑재된 커넥터는 다음과 같습니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Lambda::Function
    Connectors:
      MyConn:
        Properties:
          Destination:
            Id: MyTable
          Permissions:
            - Read
            - Write
  MyTable:
    Type: AWS::DynamoDB::Table
```

그러면 다음과 같은 `AWS::Serverless::Connector` 리소스가 생성됩니다.

```
Transform: AWS::Serverless-2016-10-31
Resources:
  ...
  MyFunctionMyConn:
    Type: AWS::Serverless::Connector
    Properties:
      Source:
        Id: MyFunction
      Destination:
        Id: MyTable
      Permissions:
        - Read
        - Write
```

**참고**  
이 구문을 사용하여 AWS SAM 템플릿에서 커넥터를 정의할 수도 있습니다. 소스 리소스가 커넥터와 별도의 템플릿에 정의된 경우 이 방법을 사용하는 것이 좋습니다.

그런 다음 이 연결에 필요한 액세스 정책이 자동으로 구성됩니다. 커넥터에서 생성된 리소스에 대한 자세한 내용은 [CloudFormation 지정할 때 생성된 리소스 AWS::Serverless::Connector](sam-specification-generated-resources-connector.md)을 잠조하세요.

## 커넥터의 예
<a name="what-are-connectors-example"></a>

다음 예제에서는 커넥터를 사용하여 AWS Lambda 함수의 데이터를 Amazon DynamoDB 테이블에 쓰는 방법을 보여줍니다.

![\[Lambda 함수는 AWS SAM 커넥터를 사용하여 DynamoDB 테이블에 데이터를 씁니다.\]](http://docs.aws.amazon.com/ko_kr/serverless-application-model/latest/developerguide/images/managing-connectors-example.png)


```
Transform: AWS::Serverless-2016-10-31
Resources:
  MyTable:
    Type: AWS::Serverless::SimpleTable
  MyFunction:
    Type: AWS::Serverless::Function
    Connectors:
      MyConn:
        Properties:
          Destination:
            Id: MyTable
          Permissions:
            - Write
    Properties:
      Runtime: nodejs16.x
      Handler: index.handler
      InlineCode: |
        const AWS = require("aws-sdk");
        const docClient = new AWS.DynamoDB.DocumentClient();
        exports.handler = async (event, context) => {
          await docClient.put({
            TableName: process.env.TABLE_NAME,
            Item: {
              id: context.awsRequestId,
              event: JSON.stringify(event) 
            }
          }).promise();
        }
      Environment:
        Variables:
          TABLE_NAME: !Ref MyTable
```

`Connectors` 리소스 속성은 Lambda 함수 소스 리소스 내에 내장되어 있습니다. DynamoDB 테이블은 `Id`속성을 사용하는 대상 리소스로 정의됩니다. 커넥터는 이 두 리소스 간의 `Write` 권한을 프로비저닝합니다.

 AWS SAM 템플릿을에 배포하면 CloudFormation AWS SAM 는이 연결이 작동하는 데 필요한 액세스 정책을 자동으로 작성합니다.

## 소스 및 대상 리소스 간 지원되는 연결
<a name="supported-connector-resources"></a>

커넥터는 선별된 소스의 조합과 대상 리소스 연결 간 `Read` 및 `Write`데이터 및 이벤트 권한 유형을 지원합니다. 예를 들어 커넥터는 `Write` 소스 리소스와 `AWS::ApiGateway::RestApi` 대상 리소스 간의 `AWS::Lambda::Function` 연결을 지원합니다.

지원되는 속성의 조합을 사용하여 소스 및 대상 리소스를 정의할 수 있습니다. 속성 요구 사항은 생성하는 연결 방식과 리소스가 정의된 위치에 따라 달라집니다.

**참고**  
커넥터는 지원되는 서버리스 리소스 유형과 비서버리스 리소스 유형 간에 권한을 제공할 수 있습니다.

지원되는 리소스 연결 및 속성 요구 사항 목록은 [커넥터에 지원되는 소스 및 대상 리소스 유형](reference-sam-connector.md#supported-connector-resource-types)을 잠조하세요.

# 에서 읽기 및 쓰기 권한 정의 AWS SAM
<a name="connector-usage-define"></a>

 AWS SAM`Read` 및 `Write` 권한은 단일 커넥터 내에서 프로비저닝할 수 있습니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Lambda::Function
    Connectors:
      MyTableConn:
        Properties:
          Destination:
            Id: MyTable
          Permissions:
            - Read
            - Write
  MyTable:
    Type: AWS::DynamoDB::Table
```

커넥터 사용에 대한 자세한 내용은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요.

# 에서 지원되는 다른 속성을 사용하여 리소스 정의 AWS SAM
<a name="connector-usage-other-properties"></a>

소스 및 대상 리소스 모두에 대해 동일한 템플릿 내에 정의된 경우 `Id` 속성을 사용합니다. 선택적으로 `Qualifier`을 추가하여 정의된 리소스의 범위를 좁힐 수 있습니다. 리소스가 동일한 템플릿 내에 있지 않은 경우 지원되는 속성을 조합하여 사용합니다.
+ 소스 및 대상 리소스에 지원되는 속성 조합 목록은 [커넥터에 지원되는 소스 및 대상 리소스 유형](reference-sam-connector.md#supported-connector-resource-types)을 잠조하세요.
+ 커넥터와 함께 사용할 수 있는 속성에 대한 설명은 [AWS::Serverless::Connector](sam-resource-connector.md)을 잠조하세요.

`Id`이 아닌 속성을 사용하여 소스 리소스를 정의하는 경우 `SourceReference`속성을 사용하십시오.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  <source-resource-logical-id>:
    Type: <resource-type>
    ...
    Connectors:
      <connector-name>:
        Properties:
          SourceReference:
            Qualifier: <optional-qualifier>
            <other-supported-properties>
          Destination:
            <properties-that-identify-destination-resource>
          Permissions:
            <permission-types-to-provision>
```

다음은 `Qualifier`를 사용하여 Amazon API Gateway 리소스의 범위를 좁히는 예제입니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyApi:
    Type: AWS::Serverless::Api
    Connectors:
      ApiToLambdaConn:
        Properties:
          SourceReference:
            Qualifier: Prod/GET/foobar
          Destination:
            Id: MyFunction
          Permissions:
            - Write           
  ...
```

다음은 지원되는 `Arn`와 `Type`의 조합을 사용하여 다른 템플릿에서 대상 리소스를 정의하는 예제입니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Connectors:
      TableConn:
        Properties:
          Destination:
            Type: AWS::DynamoDB::Table
            Arn: !GetAtt MyTable.Arn
  ...
```

커넥터 사용에 대한 자세한 내용은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요.

# 의 단일 소스에서 여러 커넥터 생성 AWS SAM
<a name="connector-usage-single-source"></a>

소스 리소스 내에서 각각 대상 리소스가 다른 여러 커넥터를 정의할 수 있습니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Connectors:
      BucketConn:
        Properties:
          Destination:
            Id: amzn-s3-demo-bucket
          Permissions:
            - Read
            - Write
      SQSConn:
        Properties:
          Destination:
            Id: MyQueue
          Permissions:
            - Read
            - Write
      TableConn:
        Properties:
          Destination:
            Id: MyTable
          Permissions:
            - Read
            - Write
      TableConnWithTableArn:
        Properties:
          Destination:
            Type: AWS::DynamoDB::Table
            Arn: !GetAtt MyTable.Arn
          Permissions:
            - Read
            - Write
...
```

커넥터 사용에 대한 자세한 내용은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요.

# 에서 다중 대상 커넥터 생성 AWS SAM
<a name="connector-usage-multi-destination"></a>

소스 리소스 내에서 여러 대상 리소스가 있는 단일 커넥터를 정의할 수 있습니다. Amazon Simple Storage Service(S3) 버킷과 DynamoDB 테이블에 연결된 Lambda 함수 소스 리소스의 예는 다음과 같습니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Connectors:
      WriteAccessConn:
        Properties:
          Destination:
            - Id: OutputBucket
            - Id: CredentialTable
          Permissions:
            - Write
  ...
  OutputBucket:
    Type: AWS::S3::Bucket
  CredentialTable:
    Type: AWS::DynamoDB::Table
```

커넥터 사용에 대한 자세한 내용은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요.

# 의 커넥터를 사용하여 리소스 속성 정의 AWS SAM
<a name="connector-usage-resource-attributes"></a>

리소스에 대해서 리소스 속성을 정의하여 추가 행동 및 관계를 지정할 수 있습니다. 리소스 속성에 대한 자세한 내용은 [ 사용자 가이드](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-product-attribute-reference.html)의 *AWS CloudFormation 리소스 속성 참조*를 잠조하세요.

커넥터 속성과 동일한 수준에서 리소스 속성을 정의하여 내장 커넥터에 리소스 속성을 추가할 수 있습니다. 배포 시 AWS SAM 템플릿이 변환되면 속성이 생성된 리소스로 전달됩니다.

```
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
...
Resources:
  MyFunction:
    Type: AWS::Serverless::Function
    Connectors:
      MyConn:
        DeletionPolicy: Retain
        DependsOn: AnotherFunction
        Properties:
          ...
```

커넥터 사용에 대한 자세한 내용은 [AWS SAM 커넥터 참조](reference-sam-connector.md) 섹션을 참조하세요.

## 자세히 알아보기
<a name="connector-learn-more"></a>

 AWS SAM 커넥터 사용에 대한 자세한 내용은 다음 주제를 참조하세요.
+ [AWS::Serverless::Connector](sam-resource-connector.md)
+ [에서 읽기 및 쓰기 권한 정의 AWS SAM](connector-usage-define.md)
+ [에서 지원되는 다른 속성을 사용하여 리소스 정의 AWS SAM](connector-usage-other-properties.md)
+ [의 단일 소스에서 여러 커넥터 생성 AWS SAM](connector-usage-single-source.md)
+ [에서 다중 대상 커넥터 생성 AWS SAM](connector-usage-multi-destination.md)
+ [에서 읽기 및 쓰기 권한 정의 AWS SAM](connector-usage-define.md)
+ [의 커넥터를 사용하여 리소스 속성 정의 AWS SAM](connector-usage-resource-attributes.md)

## 피드백 제공
<a name="connector-feedback"></a>

커넥터에 대한 피드백을 제공하려면 *serverless-application-model AWS GitHub리포지토리*에서 [새 문제를 제출합니다](https://github.com/aws/serverless-application-model/issues/new?assignees=&labels=area%2Fconnectors,stage%2Fneeds-triage&template=other.md&title=%28Feature%20Request%29).

# AWS SAM정책 템플릿
<a name="serverless-policy-templates"></a>

 AWS Serverless Application Model (AWS SAM)를 사용하면 정책 템플릿 목록에서 선택하여 Lambda 함수 및 AWS Step Functions 상태 시스템의 권한 범위를 애플리케이션에서 사용하는 리소스로 지정할 수 있습니다.

AWS SAM 정책 템플릿을 AWS Serverless Application Repository 사용하는의 애플리케이션은에서 애플리케이션을 배포하기 위해 특별한 고객 승인이 필요하지 않습니다 AWS Serverless Application Repository.

새 정책 템플릿 추가를 요청하려면 다음을 수행합니다.

1.  AWS SAM GitHub 프로젝트의 `develop`브랜치에 있는 policy\$1templates.json 소스 파일에 대해 풀 요청을 제출합니다. 소스 파일은 GitHub 웹사이트의 [policy\$1templates.json](https://github.com/aws/serverless-application-model/blob/develop/samtranslator/policy_templates_data/policy_templates.json)에서 찾을 수 있습니다.

1.  AWS SAM GitHub 프로젝트에서 풀 요청의 이유와 요청에 대한 링크가 포함된 문제를 제출합니다. 이 링크를 사용하여 새 문제를 제출합니다. [AWS Serverless Application Model: 문제](https://github.com/aws/serverless-application-model/issues/new).

## 구문
<a name="serverless-policy-template-syntax"></a>

템플릿 파일에서 지정하는 모든 정책 AWS SAM 템플릿에 대해 항상 정책 템플릿의 자리 표시자 값이 포함된 객체를 지정해야 합니다. 정책 템플릿에 자리 표시자 값이 필요하지 않은 경우 빈 객체를 지정해야 합니다.

### YAML
<a name="serverless-policy-template-syntax.yaml"></a>

```
MyFunction:
  Type: AWS::Serverless::Function
  Properties:
    Policies:
      - PolicyTemplateName1:        # Policy template with placeholder value
          Key1: Value1
      - PolicyTemplateName2: {}     # Policy template with no placeholder value
```

**참고**  
일반 IAM 정책을 설정했거나 Lambda를 통해 정책을 관리한 경우 빈 객체를 사용하지 않고 정책 템플릿을 설정할 수 있습니다.

## 예제
<a name="serverless-policy-template-examples"></a>

### 예 1: 자리 표시자 값이 있는 정책 템플릿
<a name="policy-template-example-1"></a>

다음 예는 [SQSPollerPolicy](serverless-policy-template-list.md#sqs-poller-policy) 정책 템플릿에서 `QueueName`를 리소스로 예상한다는 것을 보여줍니다. AWS SAM 템플릿은 동일한 애플리케이션에서 생성하거나 애플리케이션에 대한 파라미터로 요청할 수 있는 "`MyQueue`" Amazon SQS 대기열의 이름을 검색합니다.

```
 1. MyFunction:
 2.   Type: 'AWS::Serverless::Function'
 3.   Properties:
 4.     CodeUri: ${codeuri}
 5.     Handler: hello.handler
 6.     Runtime: python2.7
 7.     Policies:
 8.       - SQSPollerPolicy:
 9.           QueueName:
10.             !GetAtt MyQueue.QueueName
```

### 예 2: 자리 표시자 값이 없는 정책 템플릿
<a name="policy-template-example-2"></a>

다음 예에는 자리 표시자 값이 없는 [CloudWatchPutMetricPolicy](serverless-policy-template-list.md#cloudwatch-put-metric-policy) 정책 템플릿이 포함되어 있습니다.

**참고**  
자리 표시자 값이 없더라도 빈 객체를 지정해야 합니다. 그렇지 않으면 오류가 발생합니다.

```
1. MyFunction:
2.   Type: 'AWS::Serverless::Function'
3.   Properties:
4.     CodeUri: ${codeuri}
5.     Handler: hello.handler
6.     Runtime: python2.7
7.     Policies:
8.       - CloudWatchPutMetricPolicy: {}
```

### 예 3: 자리 표시자 값과 일반 IAM 정책이 포함된 정책 템플릿
<a name="policy-template-example-3"></a>

다음 예제에는 AmazonSQSFullAcess 정책 및 [DynamoDBCrudPolicy](serverless-policy-template-list.md#dynamo-db-crud-policy) 정책 템플릿이 포함되어 있습니다. AmazonSQSFullAccess 정책은 정책이 아닌 IAM 정책 AWS SAM 이므로 정책이에 직접 전달되므로 빈 객체를 지정할 필요가 없습니다 CloudFormation.

```
 1. MyFunction:
 2.   Type: 'AWS::Serverless::Function'
 3.   Properties:
 4.     CodeUri: ${codeuri}
 5.     Handler: hello.handler
 6.     Runtime: python2.7
 7.     Policies:
 8.       - AmazonSQSFullAccess // IAM policy could be set without passing an empty object
 9.       - DynamoDBCrudPolicy: // SAM specific policy, has a defined structure
10.            TableName: 
11.              !Ref SampleTable
```

## 정책 템플릿 테이블
<a name="serverless-policy-template-table"></a>

다음은 사용 가능한 정책 템플릿의 테이블입니다.


****  

| 정책 템플릿 | 설명 | 
| --- | --- | 
| [AcmGetCertificatePolicy](serverless-policy-template-list.md#acm-get-certificate-policy) | 인증서를 읽을 수 있는 권한을 부여합니다 AWS Certificate Manager. | 
| [AMIDescribePolicy](serverless-policy-template-list.md#ami-describe-policy) | Amazon Machine Image(AMI)를 설명할 수 있는 권한을 부여합니다. | 
| [AthenaQueryPolicy](serverless-policy-template-list.md#athena-query-policy) | Athena 쿼리를 실행할 권한을 부여합니다. | 
| [AWSSecretsManagerGetSecretValuePolicy](serverless-policy-template-list.md#secrets-manager-get-secret-value-policy) | 지정된 AWS Secrets Manager 보안 암호의 보안 암호 값을 가져올 수 있는 권한을 부여합니다. | 
| [AWSSecretsManagerRotationPolicy](serverless-policy-template-list.md#secrets-manager-rotation-policy) |  AWS Secrets Manager에서 보안 암호를 교체할 수 있는 권한을 부여합니다. | 
| [CloudFormationDescribeStacksPolicy](serverless-policy-template-list.md#cloud-formation-describe-stacks-policy) |  CloudFormation 스택을 설명할 수 있는 권한을 부여합니다. | 
| [CloudWatchDashboardPolicy](serverless-policy-template-list.md#cloudwatch-dashboard-policy) | CloudWatch 대시보드에서 작동할 지표를 배치할 권한을 부여합니다. | 
| [CloudWatchDescribeAlarmHistoryPolicy](serverless-policy-template-list.md#cloudwatch-describe-alarm-history-policy) | CloudWatch 경보 기록을 설명할 수 있는 권한을 부여합니다. | 
| [CloudWatchPutMetricPolicy](serverless-policy-template-list.md#cloudwatch-put-metric-policy) | CloudWatch에 지표를 전송할 수 있는 권한을 부여합니다. | 
| [CodeCommitCrudPolicy](serverless-policy-template-list.md#codecommit-crud-policy) | 특정 CodeCommit 리포지토리 내에서 객체를 생성/읽기/업데이트/삭제할 수 있는 권한을 부여합니다. | 
| [CodeCommitReadPolicy](serverless-policy-template-list.md#codecommit-read-policy) | 특정 CodeCommit 리포지토리 내에서 객체를 읽을 수 있는 권한을 부여합니다. | 
| [CodePipelineLambdaExecutionPolicy](serverless-policy-template-list.md#code-pipeline-lambda-execution-policy) | CodePipeline에서 간접 호출한 Lambda 함수가 작업 상태를 보고하도록 권한을 부여합니다. | 
| [CodePipelineReadOnlyPolicy](serverless-policy-template-list.md#code-pipeline-readonly-policy) | CodePipeline 파이프라인의 세부 정보를 가져올 수 있는 읽기 권한을 부여합니다. | 
| [ComprehendBasicAccessPolicy](serverless-policy-template-list.md#comprehend-basic-access-policy) | 엔터티, 핵심 문구, 언어 및 감정을 탐지할 수 있는 권한을 부여합니다. | 
| [CostExplorerReadOnlyPolicy](serverless-policy-template-list.md#cost-explorer-readonly-policy) | 청구 내역에 대한 읽기 전용 Cost Explorer API에 읽기 전용 권한을 부여합니다. | 
| [DynamoDBBackupFullAccessPolicy](serverless-policy-template-list.md#ddb-back-full-policy) | 테이블에 대한 DynamoDB 온디맨드 백업에 읽기 및 쓰기 권한을 부여합니다. | 
| [DynamoDBCrudPolicy](serverless-policy-template-list.md#dynamo-db-crud-policy) | Amazon DynamoDB 테이블에 생성, 읽기, 업데이트 및 삭제 권한을 부여합니다. | 
| [DynamoDBReadPolicy](serverless-policy-template-list.md#dynamo-db-read-policy) | DynamoDB 테이블에 읽기 전용 권한 부여 | 
| [DynamoDBReconfigurePolicy](serverless-policy-template-list.md#dynamo-db-reconfigure-policy) | DynamoDB 테이블을 재구성할 수 있는 권한을 부여합니다. | 
| [DynamoDBRestoreFromBackupPolicy](serverless-policy-template-list.md#ddb-restore-from-backup-policy) | 백업에서 테이블을 복원할 수 있는 권한을 부여합니다. | 
| [DynamoDBStreamReadPolicy](serverless-policy-template-list.md#dynamo-db-stream-read-policy) | DynamoDB 스트림과 레코드를 설명하고 읽을 수 있는 권한을 부여합니다. | 
| [DynamoDBWritePolicy](serverless-policy-template-list.md#dynamo-db-write-policy) | DynamoDB 테이블에 쓰기 전용 권한 부여 | 
| [EC2CopyImagePolicy](serverless-policy-template-list.md#ec2-copy-image-policy) | Amazon EC2 이미지를 복사할 수 있는 권한을 부여합니다. | 
| [EC2DescribePolicy](serverless-policy-template-list.md#ec2-describe-policy) | Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스를 설명할 수 있는 권한을 부여합니다. | 
| [EcsRunTaskPolicy](serverless-policy-template-list.md#ecs-run-task-policy) | 태스크 정의에 대해 새 태스크를 시작할 수 있는 권한을 부여합니다. | 
| [EFSWriteAccessPolicy](serverless-policy-template-list.md#efs-write-access-policy) | 쓰기 액세스 권한이 있는 Amazon EFS 파일 시스템을 마운트할 수 있는 권한을 부여합니다. | 
| [EKSDescribePolicy](serverless-policy-template-list.md#eks-describe-policy) | Amazon EKS 클러스터를 설명하거나 나열할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceAddJobFlowStepsPolicy](serverless-policy-template-list.md#elastic-map-reduce-add-job-flows-policy) | 실행 중인 클러스터에 새 단계를 추가할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceCancelStepsPolicy](serverless-policy-template-list.md#elastic-map-reduce-cancel-steps-policy) | 실행 중인 클러스터에서 대기 중 단계를 취소할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceModifyInstanceFleetPolicy](serverless-policy-template-list.md#elastic-map-reduce-modify-instance-fleet-policy) | 클러스터 내 인스턴스 플릿의 세부 정보를 나열하고 용량을 수정할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceModifyInstanceGroupsPolicy](serverless-policy-template-list.md#elastic-map-reduce-modify-instance-groups-policy) | 클러스터 내 인스턴스 그룹의 세부 정보를 나열하고 설정을 수정할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceSetTerminationProtectionPolicy](serverless-policy-template-list.md#elastic-map-reduce-set-termination-protection-policy) | 클러스터에 대한 종료 보호를 설정할 수 있는 권한을 부여합니다. | 
| [ElasticMapReduceTerminateJobFlowsPolicy](serverless-policy-template-list.md#elastic-map-reduce-terminate-job-flows-policy) | 클러스터를 종료할 수 있는 권한을 부여합니다. | 
| [ElasticsearchHttpPostPolicy](serverless-policy-template-list.md#elastic-search-http-post-policy) | Amazon OpenSearch Service에 POST 권한을 부여합니다. | 
| [EventBridgePutEventsPolicy](serverless-policy-template-list.md#eventbridge-put-events-policy) | EventBridge로 이벤트를 보낼 수 있는 권한을 부여합니다. | 
| [FilterLogEventsPolicy](serverless-policy-template-list.md#filter-log-events-policy) | 지정된 로그 그룹에서 CloudWatch Logs 이벤트를 필터링할 수 있는 권한을 부여합니다. | 
| [FirehoseCrudPolicy](serverless-policy-template-list.md#firehose-crud-policy) | Firehose 전송 스트림을 생성, 쓰기, 업데이트 및 삭제할 수 있는 권한을 부여합니다. | 
| [FirehoseWritePolicy](serverless-policy-template-list.md#firehose-write-policy) | Firehose 전송 스트림에 쓸 수 있는 권한을 부여합니다. | 
| [KinesisCrudPolicy](serverless-policy-template-list.md#kinesis-crud-policy) | Amazon Kinesis 스트림을 생성, 게시 및 삭제할 수 있는 권한을 부여합니다. | 
| [KinesisStreamReadPolicy](serverless-policy-template-list.md#kinesis-stream-read-policy) | Amazon Kinesis 스트림을 나열하고 읽을 수 있는 권한을 부여합니다. | 
| [KMSDecryptPolicy](serverless-policy-template-list.md#kms-decrypt-policy) |  AWS Key Management Service (AWS KMS) 키를 사용하여 복호화할 수 있는 권한을 부여합니다. | 
| [KMSEncryptPolicy](serverless-policy-template-list.md#kms-encrypt-policy) |  AWS Key Management Service (AWS KMS) 키로 암호화할 수 있는 권한을 부여합니다. | 
| [LambdaInvokePolicy](serverless-policy-template-list.md#lambda-invoke-policy) |  AWS Lambda 함수, 별칭 또는 버전을 호출할 수 있는 권한을 부여합니다. | 
| [MobileAnalyticsWriteOnlyAccessPolicy](serverless-policy-template-list.md#mobile-analytics-write-only-access-policy) | 모든 애플리케이션 리소스에 이벤트 데이터를 넣을 수 있는 쓰기 전용 권한을 부여합니다. | 
| [OrganizationsListAccountsPolicy](serverless-policy-template-list.md#organizations-list-accounts-policy) | 하위 계정 이름 및 ID를 나열할 수 있는 읽기 전용 권한을 부여합니다. | 
| [PinpointEndpointAccessPolicy](serverless-policy-template-list.md#pinpoint-endpoint-access-policy) | Amazon Pinpoint 애플리케이션의 엔드포인트를 가져오고 업데이트할 수 있는 권한을 부여합니다. | 
| [PollyFullAccessPolicy](serverless-policy-template-list.md#polly-full-access-policy) | Amazon Polly 어휘 리소스에 대한 전체 액세스 권한을 부여합니다. | 
| [RekognitionDetectOnlyPolicy](serverless-policy-template-list.md#rekognition-detect-only-policy) | 얼굴, 레이블, 텍스트를 감지할 수 있는 권한을 부여합니다. | 
| [RekognitionFacesManagementPolicy](serverless-policy-template-list.md#rekognition-face-management-policy) | Amazon Rekognition 컬렉션에서 얼굴을 추가, 삭제 및 검색할 수 있는 권한을 부여합니다. | 
| [RekognitionFacesPolicy](serverless-policy-template-list.md#rekognition-faces-policy) | 얼굴과 레이블을 비교하고 감지할 수 있는 권한을 부여합니다. | 
| [RekognitionLabelsPolicy](serverless-policy-template-list.md#rekognition-labels-policy) | 객체 및 중재 레이블을 탐지할 수 있는 권한을 부여합니다. | 
| [RekognitionNoDataAccessPolicy](serverless-policy-template-list.md#rekognition-no-data-access-policy) | 얼굴과 레이블을 비교하고 감지할 수 있는 권한을 부여합니다. | 
| [RekognitionReadPolicy](serverless-policy-template-list.md#rekognition-read-policy) | 얼굴을 나열하고 검색할 수 있는 권한을 부여합니다. | 
| [RekognitionWriteOnlyAccessPolicy](serverless-policy-template-list.md#rekognition-write-only-access-policy) | 얼굴을 모으고 인덱싱할 수 있는 권한을 부여합니다. | 
| [Route53ChangeResourceRecordSetsPolicy](serverless-policy-template-list.md#route53-change-resource-record-sets-policy) | Route 53에서 리소스 레코드 세트를 변경할 수 있는 권한을 부여합니다. | 
| [S3CrudPolicy](serverless-policy-template-list.md#s3-crud-policy) | Amazon S3 버킷의 객체에 대해 작업을 수행할 수 있는 생성, 읽기, 업데이트 및 삭제 권한을 부여합니다. | 
| [S3FullAccessPolicy](serverless-policy-template-list.md#s3-full-access-policy) | Amazon S3 버킷의 객체에 대해 작업을 수행할 수 있는 전체 액세스 권한을 부여합니다. | 
| [S3ReadPolicy](serverless-policy-template-list.md#s3-read-policy) | Amazon Simple Storage Service(S3) 버킷에 있는 객체를 읽을 수 있는 읽기 전용 권한을 부여합니다. | 
| [S3WritePolicy](serverless-policy-template-list.md#s3-write-policy) | Amazon S3 버킷에 객체를 쓸 수 있는 쓰기 권한을 부여합니다. | 
| [SageMakerCreateEndpointConfigPolicy](serverless-policy-template-list.md#sagemaker-create-endpoint-config-policy) | SageMaker AI에서 엔드포인트 구성을 생성할 수 있는 권한을 부여합니다. | 
| [SageMakerCreateEndpointPolicy](serverless-policy-template-list.md#sagemaker-create-endpoint-policy) | SageMaker AI에서 엔드포인트를 생성할 수 있는 권한을 부여합니다. | 
| [ServerlessRepoReadWriteAccessPolicy](serverless-policy-template-list.md#serverlessrepo-read-write-access-policy) |  AWS Serverless Application Repository 서비스에서 애플리케이션을 생성하고 나열할 수 있는 권한을 부여합니다. | 
| [SESBulkTemplatedCrudPolicy](serverless-policy-template-list.md#ses-bulk-templated-crud-policy) | 이메일, 템플릿 이메일, 템플릿 대량 이메일을 보내고 자격 증명을 확인할 수 있는 권한을 부여합니다. | 
| [SESBulkTemplatedCrudPolicy\$1v2](serverless-policy-template-list.md#ses-bulk-templated-crud-policy-v2) | Amazon SES 이메일, 템플릿 기반 이메일, 템플릿 형식의 대량 이메일을 보내고 ID를 확인할 수 있는 권한을 부여합니다. | 
| [SESCrudPolicy](serverless-policy-template-list.md#ses-crud-policy) | 이메일을 보내고 ID를 확인할 수 있는 권한을 부여합니다. | 
| [SESEmailTemplateCrudPolicy](serverless-policy-template-list.md#ses-email-template-crud-policy) | Amazon SES 이메일 템플릿을 만들고, 가져오고, 나열하고, 업데이트하고, 삭제할 수 있는 권한을 부여합니다. | 
| [SESSendBouncePolicy](serverless-policy-template-list.md#ses-send-bounce-policy) | Amazon Simple Email Service(Amazon SES) ID에 대한 SendBounce 권한을 부여합니다. | 
| [SNSCrudPolicy](serverless-policy-template-list.md#sns-crud-policy) | Amazon SNS 주제를 만들고, 게시하고, 구독할 수 있는 권한을 부여합니다. | 
| [SNSPublishMessagePolicy](serverless-policy-template-list.md#sqs-publish-message-policy) | Amazon Simple Notification Service(Amazon SNS) 주제에 이벤트 메시지 게시 | 
| [SQSPollerPolicy](serverless-policy-template-list.md#sqs-poller-policy) | Amazon Simple Queue Service(Amazon SQS) 대기열을 폴링할 수 있는 권한을 부여합니다. | 
| [SQSSendMessagePolicy](serverless-policy-template-list.md#sqs-send-message-policy) | Amazon SQS 대기열에 메시지를 보낼 수 있는 권한을 부여합니다. | 
| [SSMParameterReadPolicy](serverless-policy-template-list.md#ssm-parameter-read-policy) | Amazon EC2 Systems Manager(SSM) 파라미터 스토어의 파라미터에 액세스하여 이 계정에 보안 암호를 로드할 수 있는 권한을 부여합니다. 파라미터 이름에 슬래시 접두사가 없을 때 사용합니다. | 
| [SSMParameterWithSlashPrefixReadPolicy](serverless-policy-template-list.md#ssm-parameter-slash-read-policy) | Amazon EC2 Systems Manager(SSM) 파라미터 스토어의 파라미터에 액세스하여 이 계정에 보안 암호를 로드할 수 있는 권한을 부여합니다. 파라미터 이름에 슬래시 접두사가 있는 경우 사용합니다. | 
| [StepFunctionsExecutionPolicy](serverless-policy-template-list.md#stepfunctions-execution-policy) | Step Functions 상태 머신 실행을 시작하기 위해 권한을 제공합니다. | 
| [TextractDetectAnalyzePolicy](serverless-policy-template-list.md#textract-detect-analyze-policy) | Amazon Textract를 사용하여 문서를 탐지하고 분석할 수 있는 액세스 권한을 제공합니다. | 
| [TextractGetResultPolicy](serverless-policy-template-list.md#textract-get-result-policy) | Amazon Textract에서 문서를 탐지하고 분석할 수 있는 액세스 권한을 제공합니다. | 
| [TextractPolicy](serverless-policy-template-list.md#textract-policy) | Amazon Textract에 대한 모든 액세스 권한을 부여합니다. | 
| [VPCAccessPolicy](serverless-policy-template-list.md#vpc-access-policy) | 탄력적 네트워크 인터페이스를 생성, 삭제, 설명 및 분리할 수 있는 액세스 권한을 제공합니다. | 

## 문제 해결
<a name="serverless-policy-template-troubleshooting"></a>

### SAM CLI error: "Must specify valid parameter values for policy template '<policy-template-name>'"
<a name="serverless-policy-template-troubleshooting-"></a>

`sam build`를 실행하면 다음 오류가 표시됩니다.

```
"Must specify valid parameter values for policy template '<policy-template-name>'"
```

즉, 자리 표시자 값이 없는 정책 템플릿을 선언할 때 빈 객체를 전달하지 않았습니다.

이 문제를 해결하려면 다음 [CloudWatchPutMetricPolicy](serverless-policy-template-list.md#cloudwatch-put-metric-policy) 예제와 같이 정책을 선언합니다.

```
1. MyFunction:
2.   Policies:
3.     - CloudWatchPutMetricPolicy: {}
```

# AWS SAM 정책 템플릿 목록
<a name="serverless-policy-template-list"></a>

다음은 사용 가능한 정책 템플릿과 각 템플릿에 적용되는 권한입니다. AWS Serverless Application Model (AWS SAM)는 자리 표시자 항목(예: AWS 리전 및 계정 ID)을 적절한 정보로 자동으로 채웁니다.

**Topics**
+ [AcmGetCertificatePolicy](#acm-get-certificate-policy)
+ [AMIDescribePolicy](#ami-describe-policy)
+ [AthenaQueryPolicy](#athena-query-policy)
+ [AWSSecretsManagerGetSecretValuePolicy](#secrets-manager-get-secret-value-policy)
+ [AWSSecretsManagerRotationPolicy](#secrets-manager-rotation-policy)
+ [CloudFormationDescribeStacksPolicy](#cloud-formation-describe-stacks-policy)
+ [CloudWatchDashboardPolicy](#cloudwatch-dashboard-policy)
+ [CloudWatchDescribeAlarmHistoryPolicy](#cloudwatch-describe-alarm-history-policy)
+ [CloudWatchPutMetricPolicy](#cloudwatch-put-metric-policy)
+ [CodePipelineLambdaExecutionPolicy](#code-pipeline-lambda-execution-policy)
+ [CodePipelineReadOnlyPolicy](#code-pipeline-readonly-policy)
+ [CodeCommitCrudPolicy](#codecommit-crud-policy)
+ [CodeCommitReadPolicy](#codecommit-read-policy)
+ [ComprehendBasicAccessPolicy](#comprehend-basic-access-policy)
+ [CostExplorerReadOnlyPolicy](#cost-explorer-readonly-policy)
+ [DynamoDBBackupFullAccessPolicy](#ddb-back-full-policy)
+ [DynamoDBCrudPolicy](#dynamo-db-crud-policy)
+ [DynamoDBReadPolicy](#dynamo-db-read-policy)
+ [DynamoDBReconfigurePolicy](#dynamo-db-reconfigure-policy)
+ [DynamoDBRestoreFromBackupPolicy](#ddb-restore-from-backup-policy)
+ [DynamoDBStreamReadPolicy](#dynamo-db-stream-read-policy)
+ [DynamoDBWritePolicy](#dynamo-db-write-policy)
+ [EC2CopyImagePolicy](#ec2-copy-image-policy)
+ [EC2DescribePolicy](#ec2-describe-policy)
+ [EcsRunTaskPolicy](#ecs-run-task-policy)
+ [EFSWriteAccessPolicy](#efs-write-access-policy)
+ [EKSDescribePolicy](#eks-describe-policy)
+ [ElasticMapReduceAddJobFlowStepsPolicy](#elastic-map-reduce-add-job-flows-policy)
+ [ElasticMapReduceCancelStepsPolicy](#elastic-map-reduce-cancel-steps-policy)
+ [ElasticMapReduceModifyInstanceFleetPolicy](#elastic-map-reduce-modify-instance-fleet-policy)
+ [ElasticMapReduceModifyInstanceGroupsPolicy](#elastic-map-reduce-modify-instance-groups-policy)
+ [ElasticMapReduceSetTerminationProtectionPolicy](#elastic-map-reduce-set-termination-protection-policy)
+ [ElasticMapReduceTerminateJobFlowsPolicy](#elastic-map-reduce-terminate-job-flows-policy)
+ [ElasticsearchHttpPostPolicy](#elastic-search-http-post-policy)
+ [EventBridgePutEventsPolicy](#eventbridge-put-events-policy)
+ [FilterLogEventsPolicy](#filter-log-events-policy)
+ [FirehoseCrudPolicy](#firehose-crud-policy)
+ [FirehoseWritePolicy](#firehose-write-policy)
+ [KinesisCrudPolicy](#kinesis-crud-policy)
+ [KinesisStreamReadPolicy](#kinesis-stream-read-policy)
+ [KMSDecryptPolicy](#kms-decrypt-policy)
+ [KMSEncryptPolicy](#kms-encrypt-policy)
+ [LambdaInvokePolicy](#lambda-invoke-policy)
+ [MobileAnalyticsWriteOnlyAccessPolicy](#mobile-analytics-write-only-access-policy)
+ [OrganizationsListAccountsPolicy](#organizations-list-accounts-policy)
+ [PinpointEndpointAccessPolicy](#pinpoint-endpoint-access-policy)
+ [PollyFullAccessPolicy](#polly-full-access-policy)
+ [RekognitionDetectOnlyPolicy](#rekognition-detect-only-policy)
+ [RekognitionFacesManagementPolicy](#rekognition-face-management-policy)
+ [RekognitionFacesPolicy](#rekognition-faces-policy)
+ [RekognitionLabelsPolicy](#rekognition-labels-policy)
+ [RekognitionNoDataAccessPolicy](#rekognition-no-data-access-policy)
+ [RekognitionReadPolicy](#rekognition-read-policy)
+ [RekognitionWriteOnlyAccessPolicy](#rekognition-write-only-access-policy)
+ [Route53ChangeResourceRecordSetsPolicy](#route53-change-resource-record-sets-policy)
+ [S3CrudPolicy](#s3-crud-policy)
+ [S3FullAccessPolicy](#s3-full-access-policy)
+ [S3ReadPolicy](#s3-read-policy)
+ [S3WritePolicy](#s3-write-policy)
+ [SageMakerCreateEndpointConfigPolicy](#sagemaker-create-endpoint-config-policy)
+ [SageMakerCreateEndpointPolicy](#sagemaker-create-endpoint-policy)
+ [ServerlessRepoReadWriteAccessPolicy](#serverlessrepo-read-write-access-policy)
+ [SESBulkTemplatedCrudPolicy](#ses-bulk-templated-crud-policy)
+ [SESBulkTemplatedCrudPolicy\$1v2](#ses-bulk-templated-crud-policy-v2)
+ [SESCrudPolicy](#ses-crud-policy)
+ [SESEmailTemplateCrudPolicy](#ses-email-template-crud-policy)
+ [SESSendBouncePolicy](#ses-send-bounce-policy)
+ [SNSCrudPolicy](#sns-crud-policy)
+ [SNSPublishMessagePolicy](#sqs-publish-message-policy)
+ [SQSPollerPolicy](#sqs-poller-policy)
+ [SQSSendMessagePolicy](#sqs-send-message-policy)
+ [SSMParameterReadPolicy](#ssm-parameter-read-policy)
+ [SSMParameterWithSlashPrefixReadPolicy](#ssm-parameter-slash-read-policy)
+ [StepFunctionsExecutionPolicy](#stepfunctions-execution-policy)
+ [TextractDetectAnalyzePolicy](#textract-detect-analyze-policy)
+ [TextractGetResultPolicy](#textract-get-result-policy)
+ [TextractPolicy](#textract-policy)
+ [VPCAccessPolicy](#vpc-access-policy)

## AcmGetCertificatePolicy
<a name="acm-get-certificate-policy"></a>

인증서를 읽을 수 있는 권한을 부여합니다 AWS Certificate Manager.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "acm:GetCertificate"
    ],
    "Resource": {
      "Fn::Sub": [
        "${certificateArn}",
        {
          "certificateArn": {
            "Ref": "CertificateArn"
          }
        }
      ]
    }
  }
]
```

## AMIDescribePolicy
<a name="ami-describe-policy"></a>

Amazon Machine Image(AMI)를 설명할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ec2:DescribeImages"
    ],
    "Resource": "*"
  }
]
```

## AthenaQueryPolicy
<a name="athena-query-policy"></a>

Athena 쿼리를 실행할 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "athena:ListWorkGroups",
      "athena:GetExecutionEngine",
      "athena:GetExecutionEngines",
      "athena:GetNamespace",
      "athena:GetCatalogs",
      "athena:GetNamespaces",
      "athena:GetTables",
      "athena:GetTable"
    ],
    "Resource": "*"
  },
  {
    "Effect": "Allow",
    "Action": [
      "athena:StartQueryExecution",
      "athena:GetQueryResults",
      "athena:DeleteNamedQuery",
      "athena:GetNamedQuery",
      "athena:ListQueryExecutions",
      "athena:StopQueryExecution",
      "athena:GetQueryResultsStream",
      "athena:ListNamedQueries",
      "athena:CreateNamedQuery",
      "athena:GetQueryExecution",
      "athena:BatchGetNamedQuery",
      "athena:BatchGetQueryExecution",
      "athena:GetWorkGroup"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:athena:${AWS::Region}:${AWS::AccountId}:workgroup/${workgroupName}",
        {
          "workgroupName": {
            "Ref": "WorkGroupName"
          }
        }
      ]
    }
  }
]
```

## AWSSecretsManagerGetSecretValuePolicy
<a name="secrets-manager-get-secret-value-policy"></a>

지정된 보안 암호의 AWS Secrets Manager 보안 암호 값을 가져올 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "secretsmanager:GetSecretValue"
    ],
    "Resource": {
      "Fn::Sub": [
        "${secretArn}",
        {
          "secretArn": {
            "Ref": "SecretArn"
          }
        }
      ]
    }
  }
]
```

## AWSSecretsManagerRotationPolicy
<a name="secrets-manager-rotation-policy"></a>

 AWS Secrets Manager에서 보안 암호를 교체할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "secretsmanager:DescribeSecret",
      "secretsmanager:GetSecretValue",
      "secretsmanager:PutSecretValue",
      "secretsmanager:UpdateSecretVersionStage"
    ],
    "Resource": {
      "Fn::Sub": "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:*"
    },
    "Condition": {
      "StringEquals": {
        "secretsmanager:resource/AllowRotationLambdaArn": {
          "Fn::Sub": [
            "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:${functionName}",
            {
              "functionName": {
                "Ref": "FunctionName"
              }
            }
          ]
        }
      }
    }
  },
  {
    "Effect": "Allow",
    "Action": [
      "secretsmanager:GetRandomPassword"
    ],
    "Resource": "*"
  }
]
```

## CloudFormationDescribeStacksPolicy
<a name="cloud-formation-describe-stacks-policy"></a>

 CloudFormation 스택을 설명할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "cloudformation:DescribeStacks"
    ],
    "Resource": {
      "Fn::Sub": "arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/*"
    }
  }
]
```

## CloudWatchDashboardPolicy
<a name="cloudwatch-dashboard-policy"></a>

CloudWatch 대시보드에서 작동할 지표를 배치할 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "cloudwatch:GetDashboard",
      "cloudwatch:ListDashboards",
      "cloudwatch:PutDashboard",
      "cloudwatch:ListMetrics"
    ],
    "Resource": "*"
  }
]
```

## CloudWatchDescribeAlarmHistoryPolicy
<a name="cloudwatch-describe-alarm-history-policy"></a>

Amazon CloudWatch 경보 기록을 설명할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "cloudwatch:DescribeAlarmHistory"
    ],
    "Resource": "*"
  }
]
```

## CloudWatchPutMetricPolicy
<a name="cloudwatch-put-metric-policy"></a>

CloudWatch에 지표를 전송할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "cloudwatch:PutMetricData"
    ],
    "Resource": "*"
  }
]
```

## CodePipelineLambdaExecutionPolicy
<a name="code-pipeline-lambda-execution-policy"></a>

에서 호출한 Lambda 함수가 작업 상태를 AWS CodePipeline 보고할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "codepipeline:PutJobSuccessResult",
      "codepipeline:PutJobFailureResult"
    ],
    "Resource": "*"
  }
]
```

## CodePipelineReadOnlyPolicy
<a name="code-pipeline-readonly-policy"></a>

CodePipeline 파이프라인의 세부 정보를 가져올 수 있는 읽기 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "codepipeline:ListPipelineExecutions"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:codepipeline:${AWS::Region}:${AWS::AccountId}:${pipelinename}",
        {
          "pipelinename": {
            "Ref": "PipelineName"
          }
        }
      ]
    }
  }
]
```

## CodeCommitCrudPolicy
<a name="codecommit-crud-policy"></a>

특정 CodeCommit 리포지토리 내에서 객체를 만들고, 읽고, 업데이트하고, 삭제할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "codecommit:GitPull",
      "codecommit:GitPush",
      "codecommit:CreateBranch",
      "codecommit:DeleteBranch",
      "codecommit:GetBranch",
      "codecommit:ListBranches",
      "codecommit:MergeBranchesByFastForward",
      "codecommit:MergeBranchesBySquash",
      "codecommit:MergeBranchesByThreeWay",
      "codecommit:UpdateDefaultBranch",
      "codecommit:BatchDescribeMergeConflicts",
      "codecommit:CreateUnreferencedMergeCommit",
      "codecommit:DescribeMergeConflicts",
      "codecommit:GetMergeCommit",
      "codecommit:GetMergeOptions",
      "codecommit:BatchGetPullRequests",
      "codecommit:CreatePullRequest",
      "codecommit:DescribePullRequestEvents",
      "codecommit:GetCommentsForPullRequest",
      "codecommit:GetCommitsFromMergeBase",
      "codecommit:GetMergeConflicts",
      "codecommit:GetPullRequest",
      "codecommit:ListPullRequests",
      "codecommit:MergePullRequestByFastForward",
      "codecommit:MergePullRequestBySquash",
      "codecommit:MergePullRequestByThreeWay",
      "codecommit:PostCommentForPullRequest",
      "codecommit:UpdatePullRequestDescription",
      "codecommit:UpdatePullRequestStatus",
      "codecommit:UpdatePullRequestTitle",
      "codecommit:DeleteFile",
      "codecommit:GetBlob",
      "codecommit:GetFile",
      "codecommit:GetFolder",
      "codecommit:PutFile",
      "codecommit:DeleteCommentContent",
      "codecommit:GetComment",
      "codecommit:GetCommentsForComparedCommit",
      "codecommit:PostCommentForComparedCommit",
      "codecommit:PostCommentReply",
      "codecommit:UpdateComment",
      "codecommit:BatchGetCommits",
      "codecommit:CreateCommit",
      "codecommit:GetCommit",
      "codecommit:GetCommitHistory",
      "codecommit:GetDifferences",
      "codecommit:GetObjectIdentifier",
      "codecommit:GetReferences",
      "codecommit:GetTree",
      "codecommit:GetRepository",
      "codecommit:UpdateRepositoryDescription",
      "codecommit:ListTagsForResource",
      "codecommit:TagResource",
      "codecommit:UntagResource",
      "codecommit:GetRepositoryTriggers",
      "codecommit:PutRepositoryTriggers",
      "codecommit:TestRepositoryTriggers",
      "codecommit:GetBranch",
      "codecommit:GetCommit",
      "codecommit:UploadArchive",
      "codecommit:GetUploadArchiveStatus",
      "codecommit:CancelUploadArchive"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:codecommit:${AWS::Region}:${AWS::AccountId}:${repositoryName}",
        {
          "repositoryName": {
            "Ref": "RepositoryName"
          }
        }
      ]
    }
  }
]
```

## CodeCommitReadPolicy
<a name="codecommit-read-policy"></a>

특정 CodeCommit 리포지토리 내에서 객체를 읽을 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "codecommit:GitPull",
      "codecommit:GetBranch",
      "codecommit:ListBranches",
      "codecommit:BatchDescribeMergeConflicts",
      "codecommit:DescribeMergeConflicts",
      "codecommit:GetMergeCommit",
      "codecommit:GetMergeOptions",
      "codecommit:BatchGetPullRequests",
      "codecommit:DescribePullRequestEvents",
      "codecommit:GetCommentsForPullRequest",
      "codecommit:GetCommitsFromMergeBase",
      "codecommit:GetMergeConflicts",
      "codecommit:GetPullRequest",
      "codecommit:ListPullRequests",
      "codecommit:GetBlob",
      "codecommit:GetFile",
      "codecommit:GetFolder",
      "codecommit:GetComment",
      "codecommit:GetCommentsForComparedCommit",
      "codecommit:BatchGetCommits",
      "codecommit:GetCommit",
      "codecommit:GetCommitHistory",
      "codecommit:GetDifferences",
      "codecommit:GetObjectIdentifier",
      "codecommit:GetReferences",
      "codecommit:GetTree",
      "codecommit:GetRepository",
      "codecommit:ListTagsForResource",
      "codecommit:GetRepositoryTriggers",
      "codecommit:TestRepositoryTriggers",
      "codecommit:GetBranch",
      "codecommit:GetCommit",
      "codecommit:GetUploadArchiveStatus"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:codecommit:${AWS::Region}:${AWS::AccountId}:${repositoryName}",
        {
          "repositoryName": {
            "Ref": "RepositoryName"
          }
        }
      ]
    }
  }
]
```

## ComprehendBasicAccessPolicy
<a name="comprehend-basic-access-policy"></a>

엔터티, 핵심 문구, 언어 및 감정을 탐지할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "comprehend:BatchDetectKeyPhrases",
      "comprehend:DetectDominantLanguage",
      "comprehend:DetectEntities",
      "comprehend:BatchDetectEntities",
      "comprehend:DetectKeyPhrases",
      "comprehend:DetectSentiment",
      "comprehend:BatchDetectDominantLanguage",
      "comprehend:BatchDetectSentiment"
    ],
    "Resource": "*"
  }
]
```

## CostExplorerReadOnlyPolicy
<a name="cost-explorer-readonly-policy"></a>

결제 기록에 대한 읽기 전용 AWS Cost Explorer (Cost Explorer) APIs에 읽기 전용 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ce:GetCostAndUsage",
      "ce:GetDimensionValues",
      "ce:GetReservationCoverage",
      "ce:GetReservationPurchaseRecommendation",
      "ce:GetReservationUtilization",
      "ce:GetTags"
    ],
    "Resource": "*"
  }
]
```

## DynamoDBBackupFullAccessPolicy
<a name="ddb-back-full-policy"></a>

테이블에 대한 DynamoDB 온디맨드 백업에 읽기 및 쓰기 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:CreateBackup",
      "dynamodb:DescribeContinuousBackups"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  },
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:DeleteBackup",
      "dynamodb:DescribeBackup",
      "dynamodb:ListBackups"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/backup/*",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  }
]
```

## DynamoDBCrudPolicy
<a name="dynamo-db-crud-policy"></a>

Amazon DynamoDB 테이블에 생성, 읽기, 업데이트 및 삭제 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:GetItem",
      "dynamodb:DeleteItem",
      "dynamodb:PutItem",
      "dynamodb:Scan",
      "dynamodb:Query",
      "dynamodb:UpdateItem",
      "dynamodb:BatchWriteItem",
      "dynamodb:BatchGetItem",
      "dynamodb:DescribeTable",
      "dynamodb:ConditionCheckItem"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/index/*",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      }
    ]
  }
]
```

## DynamoDBReadPolicy
<a name="dynamo-db-read-policy"></a>

DynamoDB 테이블에 읽기 전용 권한 부여

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:GetItem",
      "dynamodb:Scan",
      "dynamodb:Query",
      "dynamodb:BatchGetItem",
      "dynamodb:DescribeTable"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/index/*",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      }
    ]
  }
]
```

## DynamoDBReconfigurePolicy
<a name="dynamo-db-reconfigure-policy"></a>

DynamoDB 테이블을 재구성할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:UpdateTable"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  }
]
```

## DynamoDBRestoreFromBackupPolicy
<a name="ddb-restore-from-backup-policy"></a>

백업에서 테이블을 복원할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:RestoreTableFromBackup"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/backup/*",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  },
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:PutItem",
      "dynamodb:UpdateItem",
      "dynamodb:DeleteItem",
      "dynamodb:GetItem",
      "dynamodb:Query",
      "dynamodb:Scan",
      "dynamodb:BatchWriteItem"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  }
]
```

## DynamoDBStreamReadPolicy
<a name="dynamo-db-stream-read-policy"></a>

DynamoDB 스트림과 레코드를 설명하고 읽을 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:DescribeStream",
      "dynamodb:GetRecords",
      "dynamodb:GetShardIterator"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/stream/${streamName}",
        {
          "tableName": {
            "Ref": "TableName"
          },
          "streamName": {
            "Ref": "StreamName"
          }
        }
      ]
    }
  },
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:ListStreams"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/stream/*",
        {
          "tableName": {
            "Ref": "TableName"
          }
        }
      ]
    }
  }          
]
```

## DynamoDBWritePolicy
<a name="dynamo-db-write-policy"></a>

DynamoDB 테이블에 쓰기 전용 권한 부여

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "dynamodb:PutItem",
      "dynamodb:UpdateItem",
      "dynamodb:BatchWriteItem"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}/index/*",
          {
            "tableName": {
              "Ref": "TableName"
            }
          }
        ]
      }
    ]
  }
]
```

## EC2CopyImagePolicy
<a name="ec2-copy-image-policy"></a>

Amazon EC2 이미지를 복사할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ec2:CopyImage"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ec2:${AWS::Region}:${AWS::AccountId}:image/${imageId}",
        {
          "imageId": {
            "Ref": "ImageId"
          }
        }
      ]
    }
  }
]
```

## EC2DescribePolicy
<a name="ec2-describe-policy"></a>

Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스를 설명할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ec2:DescribeRegions",
      "ec2:DescribeInstances"
    ],
    "Resource": "*"
  }
]
```

## EcsRunTaskPolicy
<a name="ecs-run-task-policy"></a>

태스크 정의에 대해 새 태스크를 시작할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "ecs:RunTask"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ecs:${AWS::Region}:${AWS::AccountId}:task-definition/${taskDefinition}",
        {
          "taskDefinition": {
            "Ref": "TaskDefinition"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## EFSWriteAccessPolicy
<a name="efs-write-access-policy"></a>

쓰기 액세스 권한이 있는 Amazon EFS 파일 시스템을 마운트할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "elasticfilesystem:ClientMount",
      "elasticfilesystem:ClientWrite"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticfilesystem:${AWS::Region}:${AWS::AccountId}:file-system/${FileSystem}",
        {
          "FileSystem": {
            "Ref": "FileSystem"
          }
        }
      ]
    },
    "Condition": {
      "StringEquals": {
        "elasticfilesystem:AccessPointArn": {
          "Fn::Sub": [
            "arn:${AWS::Partition}:elasticfilesystem:${AWS::Region}:${AWS::AccountId}:access-point/${AccessPoint}",
            {
              "AccessPoint": {
                "Ref": "AccessPoint"
              }
            }
          ]
        }
      }
    }
  }
]
```

## EKSDescribePolicy
<a name="eks-describe-policy"></a>

Amazon Elastic Kubernetes Service(Amazon EKS) 클러스터를 설명하거나 나열할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "eks:DescribeCluster",
      "eks:ListClusters"
    ],
    "Resource": "*"
  }
]
```

## ElasticMapReduceAddJobFlowStepsPolicy
<a name="elastic-map-reduce-add-job-flows-policy"></a>

실행 중인 클러스터에 새 단계를 추가할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": "elasticmapreduce:AddJobFlowSteps",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticMapReduceCancelStepsPolicy
<a name="elastic-map-reduce-cancel-steps-policy"></a>

실행 중인 클러스터에서 대기 중 단계를 취소할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": "elasticmapreduce:CancelSteps",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticMapReduceModifyInstanceFleetPolicy
<a name="elastic-map-reduce-modify-instance-fleet-policy"></a>

클러스터 내 인스턴스 플릿의 세부 정보를 나열하고 용량을 수정할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "elasticmapreduce:ModifyInstanceFleet",
      "elasticmapreduce:ListInstanceFleets"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticMapReduceModifyInstanceGroupsPolicy
<a name="elastic-map-reduce-modify-instance-groups-policy"></a>

클러스터 내 인스턴스 그룹의 세부 정보를 나열하고 설정을 수정할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "elasticmapreduce:ModifyInstanceGroups",
      "elasticmapreduce:ListInstanceGroups"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticMapReduceSetTerminationProtectionPolicy
<a name="elastic-map-reduce-set-termination-protection-policy"></a>

클러스터에 대한 종료 보호를 설정할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": "elasticmapreduce:SetTerminationProtection",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticMapReduceTerminateJobFlowsPolicy
<a name="elastic-map-reduce-terminate-job-flows-policy"></a>

클러스터를 종료할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": "elasticmapreduce:TerminateJobFlows",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:elasticmapreduce:${AWS::Region}:${AWS::AccountId}:cluster/${clusterId}",
        {
          "clusterId": {
            "Ref": "ClusterId"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ElasticsearchHttpPostPolicy
<a name="elastic-search-http-post-policy"></a>

Amazon OpenSearch Service에 POST 및 PUT 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "es:ESHttpPost",
      "es:ESHttpPut"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:es:${AWS::Region}:${AWS::AccountId}:domain/${domainName}/*",
        {
          "domainName": {
            "Ref": "DomainName"
          }
        }
      ]
    }
  }
]
```

## EventBridgePutEventsPolicy
<a name="eventbridge-put-events-policy"></a>

Amazon EventBridge에 사용자 지정 이벤트를 보낼 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": "events:PutEvents",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:events:${AWS::Region}:${AWS::AccountId}:event-bus/${eventBusName}",
        {
          "eventBusName": {
            "Ref": "EventBusName"
          }
        }
      ]
    }
  }
]
```

## FilterLogEventsPolicy
<a name="filter-log-events-policy"></a>

지정된 로그 그룹에서 CloudWatch Logs 이벤트를 필터링할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "logs:FilterLogEvents"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:${logGroupName}:log-stream:*",
        {
          "logGroupName": {
            "Ref": "LogGroupName"
          }
        }
      ]
    }
  }
]
```

## FirehoseCrudPolicy
<a name="firehose-crud-policy"></a>

Firehose 전송 스트림을 생성, 쓰기, 업데이트 및 삭제할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "firehose:CreateDeliveryStream",
      "firehose:DeleteDeliveryStream",
      "firehose:DescribeDeliveryStream",
      "firehose:PutRecord",
      "firehose:PutRecordBatch",
      "firehose:UpdateDestination"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:firehose:${AWS::Region}:${AWS::AccountId}:deliverystream/${deliveryStreamName}",
        {
          "deliveryStreamName": {
            "Ref": "DeliveryStreamName"
          }
        }
      ]
    }
  }
]
```

## FirehoseWritePolicy
<a name="firehose-write-policy"></a>

Firehose 전송 스트림에 쓸 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "firehose:PutRecord",
      "firehose:PutRecordBatch"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:firehose:${AWS::Region}:${AWS::AccountId}:deliverystream/${deliveryStreamName}",
        {
          "deliveryStreamName": {
            "Ref": "DeliveryStreamName"
          }
        }
      ]
    }
  }
]
```

## KinesisCrudPolicy
<a name="kinesis-crud-policy"></a>

Amazon Kinesis 스트림을 생성, 게시 및 삭제할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "kinesis:AddTagsToStream",
      "kinesis:CreateStream",
      "kinesis:DecreaseStreamRetentionPeriod",
      "kinesis:DeleteStream",
      "kinesis:DescribeStream",
      "kinesis:DescribeStreamSummary",
      "kinesis:GetShardIterator",
      "kinesis:IncreaseStreamRetentionPeriod",
      "kinesis:ListTagsForStream",
      "kinesis:MergeShards",
      "kinesis:PutRecord",
      "kinesis:PutRecords",
      "kinesis:SplitShard",
      "kinesis:RemoveTagsFromStream"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:kinesis:${AWS::Region}:${AWS::AccountId}:stream/${streamName}",
        {
          "streamName": {
            "Ref": "StreamName"
          }
        }
      ]
    }
  }
]
```

## KinesisStreamReadPolicy
<a name="kinesis-stream-read-policy"></a>

Amazon Kinesis 스트림을 나열하고 읽을 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "kinesis:ListStreams",
      "kinesis:DescribeLimits"
    ],
    "Resource": {
      "Fn::Sub": "arn:${AWS::Partition}:kinesis:${AWS::Region}:${AWS::AccountId}:stream/*"
    }
  },
  {
    "Effect": "Allow",
    "Action": [
      "kinesis:DescribeStream",
      "kinesis:DescribeStreamSummary",
      "kinesis:GetRecords",
      "kinesis:GetShardIterator"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:kinesis:${AWS::Region}:${AWS::AccountId}:stream/${streamName}",
        {
          "streamName": {
            "Ref": "StreamName"
          }
        }
      ]
    }
  }
]
```

## KMSDecryptPolicy
<a name="kms-decrypt-policy"></a>

 AWS Key Management Service (AWS KMS) 키를 사용하여 복호화할 수 있는 권한을 부여합니다. 키 별칭이 아닌 AWS KMS 키 ID여야 `keyId` 합니다.

```
"Statement": [
  {
    "Action": "kms:Decrypt",
    "Effect": "Allow",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${keyId}",
        {
          "keyId": {
            "Ref": "KeyId"
          }
        }
      ]
    }
  }
]
```

## KMSEncryptPolicy
<a name="kms-encrypt-policy"></a>

 AWS KMS 키로 암호화할 수 있는 권한을 부여합니다. keyId는 AWS KMS 키 별칭이 아닌 키 ID여야 합니다.

```
"Statement": [
  {
    "Action": "kms:Encrypt",
    "Effect": "Allow",
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:kms:${AWS::Region}:${AWS::AccountId}:key/${keyId}",
        {
          "keyId": {
            "Ref": "KeyId"
          }
        }
      ]
    }
  }
]
```

## LambdaInvokePolicy
<a name="lambda-invoke-policy"></a>

 AWS Lambda 함수, 별칭 또는 버전을 호출할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "lambda:InvokeFunction"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:${functionName}*",
        {
          "functionName": {
            "Ref": "FunctionName"
          }
        }
      ]
    }
  }
]
```

## MobileAnalyticsWriteOnlyAccessPolicy
<a name="mobile-analytics-write-only-access-policy"></a>

모든 애플리케이션 리소스에 이벤트 데이터를 넣을 수 있는 쓰기 전용 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "mobileanalytics:PutEvents"
    ],
    "Resource": "*"
  }
]
```

## OrganizationsListAccountsPolicy
<a name="organizations-list-accounts-policy"></a>

하위 계정 이름 및 ID를 나열할 수 있는 읽기 전용 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "organizations:ListAccounts"
    ],
    "Resource": "*"
  }
]
```

## PinpointEndpointAccessPolicy
<a name="pinpoint-endpoint-access-policy"></a>

Amazon Pinpoint 애플리케이션의 엔드포인트를 가져오고 업데이트할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "mobiletargeting:GetEndpoint",
      "mobiletargeting:UpdateEndpoint",
      "mobiletargeting:UpdateEndpointsBatch"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:mobiletargeting:${AWS::Region}:${AWS::AccountId}:apps/${pinpointApplicationId}/endpoints/*",
        {
          "pinpointApplicationId": {
            "Ref": "PinpointApplicationId"
          }
        }
      ]
    }
  }
]
```

## PollyFullAccessPolicy
<a name="polly-full-access-policy"></a>

Amazon Polly 어휘 리소스에 대한 전체 액세스 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "polly:GetLexicon",
      "polly:DeleteLexicon"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:polly:${AWS::Region}:${AWS::AccountId}:lexicon/${lexiconName}",
          {
            "lexiconName": {
              "Ref": "LexiconName"
            }
          }
        ]
      }
    ]
  },
  {
    "Effect": "Allow",
    "Action": [
      "polly:DescribeVoices",
      "polly:ListLexicons",
      "polly:PutLexicon",
      "polly:SynthesizeSpeech"
    ],
    "Resource": [
      {
        "Fn::Sub": "arn:${AWS::Partition}:polly:${AWS::Region}:${AWS::AccountId}:lexicon/*"
      }
    ]
  }
]
```

## RekognitionDetectOnlyPolicy
<a name="rekognition-detect-only-policy"></a>

얼굴, 레이블, 텍스트를 감지할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:DetectFaces",
      "rekognition:DetectLabels",
      "rekognition:DetectModerationLabels",
      "rekognition:DetectText"
    ],
    "Resource": "*"
  }
]
```

## RekognitionFacesManagementPolicy
<a name="rekognition-face-management-policy"></a>

Amazon Rekognition 컬렉션에서 얼굴을 추가, 삭제 및 검색할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:IndexFaces",
      "rekognition:DeleteFaces",
      "rekognition:SearchFaces",
      "rekognition:SearchFacesByImage",
      "rekognition:ListFaces"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:rekognition:${AWS::Region}:${AWS::AccountId}:collection/${collectionId}",
        {
          "collectionId": {
            "Ref": "CollectionId"
          }
        }
      ]
    }
  }
]
```

## RekognitionFacesPolicy
<a name="rekognition-faces-policy"></a>

얼굴과 레이블을 비교하고 감지할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:CompareFaces",
      "rekognition:DetectFaces"
    ],
    "Resource": "*"
  }
]
```

## RekognitionLabelsPolicy
<a name="rekognition-labels-policy"></a>

객체 및 중재 레이블을 탐지할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:DetectLabels",
      "rekognition:DetectModerationLabels"
    ],
    "Resource": "*"
  }
]
```

## RekognitionNoDataAccessPolicy
<a name="rekognition-no-data-access-policy"></a>

얼굴과 레이블을 비교하고 감지할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:CompareFaces",
      "rekognition:DetectFaces",
      "rekognition:DetectLabels",
      "rekognition:DetectModerationLabels"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:rekognition:${AWS::Region}:${AWS::AccountId}:collection/${collectionId}",
        {
          "collectionId": {
            "Ref": "CollectionId"
          }
        }
      ]
    }
  }
]
```

## RekognitionReadPolicy
<a name="rekognition-read-policy"></a>

얼굴을 나열하고 검색할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:ListCollections",
      "rekognition:ListFaces",
      "rekognition:SearchFaces",
      "rekognition:SearchFacesByImage"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:rekognition:${AWS::Region}:${AWS::AccountId}:collection/${collectionId}",
        {
          "collectionId": {
            "Ref": "CollectionId"
          }
        }
      ]
    }
  }
]
```

## RekognitionWriteOnlyAccessPolicy
<a name="rekognition-write-only-access-policy"></a>

얼굴을 모으고 인덱싱할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "rekognition:CreateCollection",
      "rekognition:IndexFaces"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:rekognition:${AWS::Region}:${AWS::AccountId}:collection/${collectionId}",
        {
          "collectionId": {
            "Ref": "CollectionId"
          }
        }
      ]
    }
  }
]
```

## Route53ChangeResourceRecordSetsPolicy
<a name="route53-change-resource-record-sets-policy"></a>

Route 53에서 리소스 레코드 세트를 변경할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "route53:ChangeResourceRecordSets"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:route53:::hostedzone/${HostedZoneId}",
        {
          "HostedZoneId": {
            "Ref": "HostedZoneId"
          }
        }
      ]
    }
  }
]
```

## S3CrudPolicy
<a name="s3-crud-policy"></a>

Amazon S3 버킷의 객체에 대해 작업을 수행할 수 있는 생성, 읽기, 업데이트 및 삭제 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:ListBucket",
      "s3:GetBucketLocation",
      "s3:GetObjectVersion",
      "s3:PutObject",
      "s3:PutObjectAcl",
      "s3:GetLifecycleConfiguration",
      "s3:PutLifecycleConfiguration",
      "s3:DeleteObject"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}/*",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      }
    ]
  }
]
```

## S3FullAccessPolicy
<a name="s3-full-access-policy"></a>

Amazon S3 버킷의 객체에 대해 작업을 수행할 수 있는 전체 액세스 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:GetObjectAcl",
      "s3:GetObjectVersion",
      "s3:PutObject",
      "s3:PutObjectAcl",
      "s3:DeleteObject",
      "s3:DeleteObjectTagging",
      "s3:DeleteObjectVersionTagging",
      "s3:GetObjectTagging",
      "s3:GetObjectVersionTagging",
      "s3:PutObjectTagging",
      "s3:PutObjectVersionTagging"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}/*",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      }
    ]
  },
  {
    "Effect": "Allow",
    "Action": [
      "s3:ListBucket",
      "s3:GetBucketLocation",
      "s3:GetLifecycleConfiguration",
      "s3:PutLifecycleConfiguration"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      }
    ]
  }
]
```

## S3ReadPolicy
<a name="s3-read-policy"></a>

Amazon Simple Storage Service(S3) 버킷에 있는 객체를 읽을 수 있는 읽기 전용 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "s3:GetObject",
      "s3:ListBucket",
      "s3:GetBucketLocation",
      "s3:GetObjectVersion",
      "s3:GetLifecycleConfiguration"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}/*",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      }
    ]
  }
]
```

## S3WritePolicy
<a name="s3-write-policy"></a>

Amazon S3 버킷에 객체를 쓸 수 있는 쓰기 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "s3:PutObject",
      "s3:PutObjectAcl",
      "s3:PutLifecycleConfiguration"
    ],
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:s3:::${bucketName}/*",
          {
            "bucketName": {
              "Ref": "BucketName"
            }
          }
        ]
      }
    ]
  }
]
```

## SageMakerCreateEndpointConfigPolicy
<a name="sagemaker-create-endpoint-config-policy"></a>

SageMaker AI에서 엔드포인트 구성을 생성할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "sagemaker:CreateEndpointConfig"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sagemaker:${AWS::Region}:${AWS::AccountId}:endpoint-config/${endpointConfigName}",
        {
          "endpointConfigName": {
            "Ref": "EndpointConfigName"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## SageMakerCreateEndpointPolicy
<a name="sagemaker-create-endpoint-policy"></a>

SageMaker AI에서 엔드포인트를 생성할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "sagemaker:CreateEndpoint"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sagemaker:${AWS::Region}:${AWS::AccountId}:endpoint/${endpointName}",
        {
          "endpointName": {
            "Ref": "EndpointName"
          }
        }
      ]
    },
    "Effect": "Allow"
  }
]
```

## ServerlessRepoReadWriteAccessPolicy
<a name="serverlessrepo-read-write-access-policy"></a>

 AWS Serverless Application Repository (AWS SAM) 서비스에서 애플리케이션을 생성하고 나열할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "serverlessrepo:CreateApplication",
      "serverlessrepo:CreateApplicationVersion",
      "serverlessrepo:GetApplication",
      "serverlessrepo:ListApplications",
      "serverlessrepo:ListApplicationVersions"
    ],
    "Resource": [
      {
        "Fn::Sub": "arn:${AWS::Partition}:serverlessrepo:${AWS::Region}:${AWS::AccountId}:applications/*"
      }
    ]
  }
]
```

## SESBulkTemplatedCrudPolicy
<a name="ses-bulk-templated-crud-policy"></a>

Amazon SES 이메일, 템플릿 기반 이메일, 템플릿 형식의 대량 이메일을 보내고 ID를 확인할 수 있는 권한을 부여합니다.

**참고**  
 `ses:SendTemplatedEmail` 작업을 수행하려면 템플릿 ARN이 필요합니다. 대신 `SESBulkTemplatedCrudPolicy_v2`을 사용하세요.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ses:GetIdentityVerificationAttributes",
      "ses:SendEmail",
      "ses:SendRawEmail",
      "ses:SendTemplatedEmail",
      "ses:SendBulkTemplatedEmail",
      "ses:VerifyEmailIdentity"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${identityName}",
        {
          "identityName": {
            "Ref": "IdentityName"
          }
        }
      ]
    }
  }
]
```

## SESBulkTemplatedCrudPolicy\$1v2
<a name="ses-bulk-templated-crud-policy-v2"></a>

Amazon SES 이메일, 템플릿 기반 이메일, 템플릿 형식의 대량 이메일을 보내고 ID를 확인할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Action": [
      "ses:SendEmail",
      "ses:SendRawEmail",
      "ses:SendTemplatedEmail",
      "ses:SendBulkTemplatedEmail"
    ],
    "Effect": "Allow",
    "Resource": [
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${identityName}",
          {
            "identityName": {
              "Ref": "IdentityName"
            }
          }
        ]
      },
      {
        "Fn::Sub": [
          "arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:template/${templateName}",
          {
            "templateName": {
              "Ref": "TemplateName"
            }
          }
        ]
      }
    ]
  },
  {
    "Action": [
      "ses:GetIdentityVerificationAttributes",
      "ses:VerifyEmailIdentity"
    ],
    "Effect": "Allow",
    "Resource": "*"
  }
]
```

## SESCrudPolicy
<a name="ses-crud-policy"></a>

이메일을 보내고 ID를 확인할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ses:GetIdentityVerificationAttributes",
      "ses:SendEmail",
      "ses:SendRawEmail",
      "ses:VerifyEmailIdentity"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${identityName}",
        {
          "identityName": {
            "Ref": "IdentityName"
          }
        }
      ]
    }
  }
]
```

## SESEmailTemplateCrudPolicy
<a name="ses-email-template-crud-policy"></a>

Amazon SES 이메일 템플릿을 만들고, 가져오고, 나열하고, 업데이트하고, 삭제할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ses:CreateTemplate",
      "ses:GetTemplate",
      "ses:ListTemplates",
      "ses:UpdateTemplate",
      "ses:DeleteTemplate",
      "ses:TestRenderTemplate"
    ],
    "Resource": "*"
  }
]
```

## SESSendBouncePolicy
<a name="ses-send-bounce-policy"></a>

Amazon Simple Email Service(Amazon SES) ID에 대한 SendBounce 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ses:SendBounce"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ses:${AWS::Region}:${AWS::AccountId}:identity/${identityName}",
        {
          "identityName": {
            "Ref": "IdentityName"
          }
        }
      ]
    }
  }
]
```

## SNSCrudPolicy
<a name="sns-crud-policy"></a>

Amazon SNS 주제를 만들고, 게시하고, 구독할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "sns:ListSubscriptionsByTopic",
      "sns:CreateTopic",
      "sns:SetTopicAttributes",
      "sns:Subscribe",
      "sns:Publish"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sns:${AWS::Region}:${AWS::AccountId}:${topicName}*",
        {
          "topicName": {
            "Ref": "TopicName"
          }
        }
      ]
    }
  }
]
```

## SNSPublishMessagePolicy
<a name="sqs-publish-message-policy"></a>

Amazon Simple Notification Service(Amazon SNS) 주제에 이벤트 메시지 게시

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "sns:Publish"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sns:${AWS::Region}:${AWS::AccountId}:${topicName}",
        {
          "topicName": {
            "Ref": "TopicName"
          }
        }
      ]
    }
  }
]
```

## SQSPollerPolicy
<a name="sqs-poller-policy"></a>

Amazon Simple Queue Service(Amazon SQS) 대기열을 폴링할 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "sqs:ChangeMessageVisibility",
      "sqs:ChangeMessageVisibilityBatch",
      "sqs:DeleteMessage",
      "sqs:DeleteMessageBatch",
      "sqs:GetQueueAttributes",
      "sqs:ReceiveMessage"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:${queueName}",
        {
          "queueName": {
            "Ref": "QueueName"
          }
        }
      ]
    }
  }
]
```

## SQSSendMessagePolicy
<a name="sqs-send-message-policy"></a>

Amazon SQS 대기열에 메시지를 보낼 수 있는 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "sqs:SendMessage*"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:${queueName}",
        {
          "queueName": {
            "Ref": "QueueName"
          }
        }
      ]
    }
  }
]
```

## SSMParameterReadPolicy
<a name="ssm-parameter-read-policy"></a>

Amazon EC2 Systems Manager(SSM) 파라미터 스토어의 파라미터에 액세스하여 이 계정에 보안 암호를 로드할 수 있는 권한을 부여합니다. 파라미터 이름에 슬래시 접두사가 없을 때 사용합니다.

**참고**  
기본 키를 사용하지 않는 경우 `KMSDecryptPolicy` 정책도 필요합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ssm:DescribeParameters"
    ],
    "Resource": "*"
  },
  {
    "Effect": "Allow",
    "Action": [
      "ssm:GetParameters",
      "ssm:GetParameter",
      "ssm:GetParametersByPath"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${parameterName}",
        {
          "parameterName": {
            "Ref": "ParameterName"
          }
        }
      ]
    }
  }
]
```

## SSMParameterWithSlashPrefixReadPolicy
<a name="ssm-parameter-slash-read-policy"></a>

Amazon EC2 Systems Manager(SSM) 파라미터 스토어의 파라미터에 액세스하여 이 계정에 보안 암호를 로드할 수 있는 권한을 부여합니다. 파라미터 이름에 슬래시 접두사가 있는 경우 사용합니다.

**참고**  
기본 키를 사용하지 않는 경우 `KMSDecryptPolicy` 정책도 필요합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ssm:DescribeParameters"
    ],
    "Resource": "*"
  },
  {
    "Effect": "Allow",
    "Action": [
      "ssm:GetParameters",
      "ssm:GetParameter",
      "ssm:GetParametersByPath"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:ssm:${AWS::Region}:${AWS::AccountId}:parameter${parameterName}",
        {
          "parameterName": {
            "Ref": "ParameterName"
          }
        }
      ]
    }
  }
]
```

## StepFunctionsExecutionPolicy
<a name="stepfunctions-execution-policy"></a>

Step Functions 상태 머신 실행을 시작하기 위해 권한을 제공합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "states:StartExecution"
    ],
    "Resource": {
      "Fn::Sub": [
        "arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:stateMachine:${stateMachineName}",
        {
          "stateMachineName": {
            "Ref": "StateMachineName"
          }
        }
      ]
    }
  }
]
```

## TextractDetectAnalyzePolicy
<a name="textract-detect-analyze-policy"></a>

Amazon Textract를 사용하여 문서를 탐지하고 분석할 수 있는 액세스 권한을 제공합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "textract:DetectDocumentText",
      "textract:StartDocumentTextDetection",
      "textract:StartDocumentAnalysis",
      "textract:AnalyzeDocument"
    ],
    "Resource": "*"
  }
]
```

## TextractGetResultPolicy
<a name="textract-get-result-policy"></a>

Amazon Textract에서 문서를 탐지하고 분석할 수 있는 액세스 권한을 제공합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "textract:GetDocumentTextDetection",
      "textract:GetDocumentAnalysis"
    ],
    "Resource": "*"
  }
]
```

## TextractPolicy
<a name="textract-policy"></a>

Amazon Textract에 대한 모든 액세스 권한을 부여합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "textract:*"
    ],
    "Resource": "*"
  }
]
```

## VPCAccessPolicy
<a name="vpc-access-policy"></a>

탄력적 네트워크 인터페이스를 생성, 삭제, 설명 및 분리할 수 있는 액세스 권한을 제공합니다.

```
"Statement": [
  {
    "Effect": "Allow",
    "Action": [
      "ec2:CreateNetworkInterface",
      "ec2:DeleteNetworkInterface",
      "ec2:DescribeNetworkInterfaces",
      "ec2:DetachNetworkInterface"
    ],
    "Resource": "*"
  }
]
```

# CloudFormation 메커니즘을 사용하여 AWS SAM 권한 관리
<a name="sam-permissions-cloudformation"></a>

 AWS 리소스에 대한 액세스를 제어하기 위해 AWS Serverless Application Model (AWS SAM)는와 동일한 메커니즘을 사용할 수 있습니다 CloudFormation. 자세한 내용은 *AWS CloudFormation 사용 설명서*에서 [AWS Identity and Access Management를 사용한 액세스 제어](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html) 섹션을 참조하세요.

사용자에게 서버리스 애플리케이션을 관리할 수 있는 권한을 부여하는 데는 세 가지 기본 옵션이 있습니다. 각 옵션은 사용자에게 다양한 수준의 액세스 제어를 제공합니다.
+ 관리자 권한을 부여합니다.
+ 필요한 AWS 관리형 정책을 연결합니다.
+ 특정 AWS Identity and Access Management (IAM) 권한을 부여합니다.

선택한 옵션에 따라 사용자는 액세스 권한이 있는 AWS 리소스가 포함된 서버리스 애플리케이션만 관리할 수 있습니다.

다음 단원에서는 각 프로세스를 상세히 설명합니다.

## 관리자 권한 부여
<a name="sam-permissions-cloudformation-admin"></a>

사용자에게 관리자 권한을 부여하면 AWS 리소스 조합이 포함된 서버리스 애플리케이션을 관리할 수 있습니다. 이는 가장 간단한 방법이지만 사용자에게 가장 광범위한 권한 집합을 부여하므로, 사용자가 가장 큰 영향을 미치는 작업을 수행할 수 있습니다.

사용자에게 관리자 권한을 부여하는 방법에 대한 자세한 내용은 *IAM 사용자 설명서*의 [첫 번째 IAM 사용자 및 관리자 그룹 생성](https://docs.aws.amazon.com/IAM/latest/UserGuide/getting-started_create-admin-group.html)을 참조하세요.

## 필요한 AWS 관리형 정책 연결
<a name="sam-permissions-cloudformation-managed-policies"></a>

전체 관리자 권한을 부여하는 대신 [AWS 관리형 정책](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies)을 사용하여 사용자에게 권한의 일부를 부여할 수 있습니다. 이 옵션을 사용하는 경우 AWS 관리형 정책 세트가 사용자가 관리하는 서버리스 애플리케이션에 필요한 모든 작업과 리소스를 포함하는지 확인합니다.

예를 들어 다음 AWS 관리형 정책은 [샘플 Hello World 애플리케이션을 배포](serverless-getting-started-hello-world.md)하기에 충분합니다.
+ AWSCloudFormationFullAccess
+ IAMFullAccess
+ AWSLambda\$1FullAccess
+ AmazonAPIGatewayAdministrator
+ AmazonS3FullAccess
+ AmazonEC2ContainerRegistryFullAccess

 정책 연결에 대한 자세한 내용은 *IAM 사용자 설명서*의 [IAM 사용자의 권한 변경](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html)을 참조하세요.

## 특정 IAM 권한 부여
<a name="sam-permissions-cloudformation-policy-statement"></a>

가장 세분화된 수준의 액세스 제어를 위해 [정책 설명](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_statement.html)을 사용하여 사용자에게 특정 IAM 권한을 부여할 수 있습니다. 이 옵션을 사용하는 경우 사용자가 관리하는 서버리스 애플리케이션에 필요한 모든 작업과 리소스가 정책 설명에 포함되는지 확인하세요.

이 옵션의 모범 사례는 사용자에게 Lambda 실행 역할을 비롯한 역할 생성 권한을 거부하여 사용자가 자신에게 에스컬레이션된 권한을 부여할 수 없도록 하는 것입니다. 따라서 관리자는 먼저 사용자가 관리할 서버리스 애플리케이션에 지정될 [Lambda 실행 역할](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html)을 생성해야 합니다. Lambda 실행 역할 생성에 대한 자세한 내용은 [IAM 콘솔에서 실행 역할 생성](https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html#permissions-executionrole-console) 섹션을 참조하세요.

[샘플 Hello World 애플리케이션](serverless-getting-started-hello-world.md)의 경우 **AWSLambdaBasicExecutionRole**만 있으면 애플리케이션을 실행하기에 충분합니다. Lambda 실행 역할을 생성한 후 샘플 Hello World 애플리케이션의 AWS SAM 템플릿 파일을 수정하여 `AWS::Serverless::Function` 리소스에 다음 속성을 추가합니다.

```
  Role: lambda-execution-role-arn
```

수정된 Hello World 애플리케이션이 적용되면 다음 정책 설명은 사용자에게 애플리케이션을 배포, 업데이트 및 삭제할 수 있는 충분한 권한을 부여합니다.

**참고**  
이 섹션의 예제 정책 설명은 [샘플 Hello World 애플리케이션](serverless-getting-started-hello-world.md)을 배포, 업데이트 및 삭제할 수 있는 충분한 권한을 부여합니다. 애플리케이션에 추가 리소스 유형을 추가하는 경우 다음을 포함하도록 정책 설명을 업데이트해야 합니다.  
애플리케이션이 서비스 작업을 호출할 수 있는 권한.
서비스 주체(서비스 활동에 필요한 경우)
예를 들어 Step Functions 워크플로를 추가하는 경우, [여기](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsstepfunctions.html#awsstepfunctions-actions-as-permissions)에 나열된 작업에 대한 권한과 `states.amazonaws.com` 서비스 주체를 추가해야 할 수 있습니다.

IAM 정책에 대한 자세한 내용은 *IAM 사용자 설명서*의 [IAM 정책 관리](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage.html) 섹션을 참조하세요.