

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

# 소스 및 대상 엔드포인트 생성
<a name="CHAP_Endpoints.Creating"></a>

복제 인스턴스를 생성할 때 원본 및 대상 엔드포인트를 생성할 수 있습니다. 또는 복제 인스턴스가 생성된 후에 엔드포인트를 생성할 수 있습니다. 원본과 대상 데이터 저장소는 Amazon Elastic Compute Cloud(Amazon EC2) 인스턴스, Amazon Relational Database Service(Amazon RDS) DB 인스턴스 또는 온프레미스 데이터베이스에 있을 수 있습니다. (엔드포인트 중 하나가 AWS 서비스에 있어야 합니다. AWS DMS를 사용하여 온프레미스 데이터베이스에서 다른 온프레미스 데이터베이스로 마이그레이션할 수 없습니다.)

다음 절차에서는 AWS DMS 콘솔 마법사를 선택했다고 가정합니다. 참고로 AWS DMS 콘솔의 탐색 창에서 **엔드포인트**를 선택한 다음 **엔드포인트 생성**을 선택하여 이 단계를 수행할 수도 있습니다. 콘솔 마법사를 사용할 때에는 동일한 페이지에서 원본과 대상 엔드포인트를 모두 생성합니다. 콘솔 마법사를 사용하지 않을 때에는 각 엔드포인트를 별도로 생성합니다.

**AWS 콘솔을 사용하여 소스 또는 대상 데이터베이스 엔드포인트를 지정하려면**

1. **소스 및 타겟 데이터베이스 엔드포인트 연결** 페이지에서 원본 또는 대상 데이터베이스에 대한 연결 정보를 지정합니다. 다음 표는 설정에 대한 설명입니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/dms/latest/userguide/CHAP_Endpoints.Creating.html)

   다음 표에는 나열된 데이터베이스 엔진의 엔드포인트 암호 및 암호 관리자 보안 암호에서 지원되지 않는 문자가 나열되어 있습니다. 엔드포인트 암호에 쉼표(,)를 사용하려면에 제공된 Secrets Manager 지원을 사용하여 AWS DMS 인스턴스에 대한 액세스를 AWS DMS 인증합니다. 자세한 내용은 [보안 암호를 사용하여 AWS Database Migration Service 엔드포인트 액세스](security_iam_secretsmanager.md) 단원을 참조하십시오.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/dms/latest/userguide/CHAP_Endpoints.Creating.html)

1. **엔드포인트 설정**을 선택하고 필요한 경우 **AWS KMS key **을 선택합니다. [**테스트 실행**]을 선택하여 엔드포인트 연결을 테스트할 수 있습니다. 다음 표는 설정에 대한 설명입니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/dms/latest/userguide/CHAP_Endpoints.Creating.html)

# 에서 Amazon RDS 엔드포인트에 대한 IAM 인증 사용 AWS DMS
<a name="CHAP_Endpoints.Creating.IAMRDS"></a>

AWS Identity and Access Management(IAM) 데이터베이스 인증은 IAM 자격 증명을 통해 AWS 데이터베이스 액세스를 관리하여 Amazon RDS 데이터베이스에 대한 보안을 강화합니다. IAM 인증은 기존 데이터베이스 암호를 사용하는 대신 AWS 자격 증명을 사용하여 15분 동안 유효한 수명이 짧은 인증 토큰을 생성합니다. 이 접근 방식은 애플리케이션 코드에 데이터베이스 암호를 저장할 필요가 없고, 자격 증명 노출 위험을 줄이고, IAM을 통해 중앙 집중식 액세스 관리를 제공하여 보안을 크게 개선합니다. 또한 기존 AWS IAM 역할 및 정책을 활용하여 액세스 관리를 간소화하므로 다른 AWS 서비스에 사용하는 것과 동일한 IAM 프레임워크를 사용하여 데이터베이스 액세스를 제어할 수 있습니다.

AWS DMS 는 이제 Amazon RDS에서 MySQL, PostgreSQL, Aurora PostgreSQL, Aurora MySQL 또는 MariaDB 엔드포인트에 연결할 때 DMS 버전 3.6.1 이상을 실행하는 복제 인스턴스에 대한 IAM 인증을 지원합니다. 이러한 엔진에 대한 새 엔드포인트를 생성할 때 데이터베이스 자격 증명을 제공하는 대신 IAM 인증을 선택하고 IAM 역할을 지정할 수 있습니다. 이 통합은 마이그레이션 작업에 대한 데이터베이스 암호를 관리하고 저장할 필요가 없으므로 보안을 강화합니다.

## 에서 Amazon RDS 엔드포인트에 대한 IAM 인증 구성 AWS DMS
<a name="CHAP_Endpoints.Creating.IAMRDS.config"></a>

엔드포인트를 생성할 때 Amazon RDS 데이터베이스에 대한 IAM 인증을 구성할 수 있습니다. IAM 인증을 구성하려면 다음을 수행합니다.

### DMS 콘솔
<a name="CHAP_Endpoints.Creating.IAMRDS.console"></a>

1. Amazon RDS와 데이터베이스 사용자에게 IAM 인증이 활성화되어 있는지 확인합니다. 자세한 내용은 *Amazon Relational Database Service 사용 설명서*의 [IAM 데이터베이스 인증 활성화 및 비활성화](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Enabling.html)를 참조하세요.

1. IAM 콘솔로 이동하여 아래 정책을 사용하여 IAM 역할을 생성합니다.

   정책

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "VisualEditor0",
               "Effect": "Allow",
               "Action": [
                   "rds-db:connect"
               ],
               "Resource": "*"
           }
       ]
   }
   ```

------

   신뢰 정책:

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "",
               "Effect": "Allow",
               "Principal": {
                   "Service": [
                       "dms.amazonaws.com"
                   ]
               },
               "Action": "sts:AssumeRole"
           }
       ]
   }
   ```

------

1. [https://console.aws.amazon.com/dms/v2](https://console.aws.amazon.com/dms/v2)의 엔드포인트 구성 중에 **엔드포인트 데이터베이스 액세스 섹션**으로 이동하여 **IAM 인증**을 선택합니다.

1. **RDS 데이터베이스 인증에 대한 IAM 역할** 드롭다운 메뉴에서 데이터베이스에 액세스할 수 있는 적절한 권한이 있는 IAM 역할을 선택합니다.

    자세한 내용은 [소스 및 대상 엔드포인트 생성](https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.Creating.html)을 참조하세요.

### AWS CLI
<a name="CHAP_Endpoints.Creating.IAMRDS.awscli"></a>

1. Amazon RDS와 데이터베이스 사용자에게 IAM 인증이 활성화되어 있는지 확인합니다. 자세한 내용은 *Amazon Relational Database Service 사용 설명서*의 [IAM 데이터베이스 인증 활성화 및 비활성화](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Enabling.html)를 참조하세요.

1.  AWS CLI로 이동하여 IAM 역할을 생성하고 DMS가 역할을 수임하도록 허용합니다.

   정책:

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "VisualEditor0",
               "Effect": "Allow",
               "Action": [
                   "rds-db:connect"
               ],
               "Resource": "*"
           }
       ]
   }
   ```

------

   신뢰 정책:

------
#### [ JSON ]

****  

   ```
   {
       "Version":"2012-10-17",		 	 	 
       "Statement": [
           {
               "Sid": "",
               "Effect": "Allow",
               "Principal": {
                   "Service": [
                       "dms.amazonaws.com"
                   ]
               },
               "Action": "sts:AssumeRole"
           }
       ]
   }
   ```

------

1. 다음 명령을 실행하여 인증서를 가져오고 PEM 파일을 다운로드합니다. 자세한 내용은 *Amazon Relational Database Service 사용 설명서*의 [Amazon RDS용 인증서 번들 다운로드](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html#UsingWithRDS.SSL.CertificatesDownload)를 참조하세요.

   ```
   aws dms import-certificate --certificate-identifier rdsglobal --certificate-pem file://~/global-bundle.pem
   ```

1. 다음 명령을 실행하여 IAM 엔드포인트를 만들 수 있습니다.
   + PostgreSQL/Aurora PostgreSQL 엔드포인트의 경우(`sslmode`이 로 설정된 경우 `required` `--certificate-arn` 플래그가 필요하지 않음): 

     ```
     aws dms create-endpoint --endpoint-identifier <endpoint-name> --endpoint-type <source/target> --engine-name <postgres/aurora-postgres> --username <db username with iam auth privileges> --server-name <db server name> --port <port number> --ssl-mode <required/verify-ca/verify-full> --postgre-sql-settings "{\"ServiceAccessRoleArn\": \"role arn created from step 2 providing permissions for iam authentication\", \"AuthenticationMethod\": \"iam\", \"DatabaseName\": \"database name\"}" --certificate-arn <if sslmode is verify-ca/verify full use cert arn generated in step 3, otherwise this parameter is not required>
     ```
   + MySQL, MariaDB 또는 Aurora MySQL 엔드포인트의 경우: 

     ```
     aws dms create-endpoint --endpoint-identifier <endpoint-name> --endpoint-type <source/target> --engine-name <mysql/mariadb/aurora> --username <db username with iam auth privileges> --server-name <db server name> --port <port number> --ssl-mode <verify-ca/verify-full> --my-sql-settings "{\"ServiceAccessRoleArn\": \"role arn created from step 2 providing permissions for iam authentication\", \"AuthenticationMethod\": \"iam\", \"DatabaseName\": \"database name\"}" --certificate-arn <cert arn from previously imported cert in step 3>
     ```

1. 원하는 복제 인스턴스에 대해 테스트 연결을 실행하여 인스턴스 엔드포인트 연결을 생성하고 모든 것이 올바르게 설정되었는지 확인합니다.

   ```
   aws dms test-connection --replication-instance-arn <replication instance arn> --endpoint-arn <endpoint arn from previously created endpoint in step 4>
   ```
**참고**  
IAM 인증을 사용하는 경우 테스트 연결에 제공된 복제 인스턴스는 AWS DMS 버전 3.6.1 이상이어야 합니다.

## 제한 사항
<a name="CHAP_Endpoints.Creating.IAMRDS.Limitations"></a>

AWS DMS 에는 Amazon RDS 엔드포인트에서 IAM 인증을 사용할 때 다음과 같은 제한 사항이 있습니다.
+ 현재 Amazon RDS PostgreSQL 및 Amazon Aurora PostgreSQL 인스턴스는 IAM 인증을 통한 CDC 연결을 지원하지 않습니다. 자세한 내용은 *Amazon Relational Database Service 사용 설명서*의 [IAM 데이터베이스 인증 제한 사항을](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html#UsingWithRDS.IAMDBAuth.Limitations) 참조하세요.