

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Memulai dengan integrasi
<a name="zero-etl.setting-up"></a>

Sebelum Anda membuat integrasi nol-ETL, konfigurasikan DB cluster dan gudang data Anda dengan parameter dan izin yang diperlukan. Selama pengaturan, Anda akan menyelesaikan langkah-langkah berikut:

1. [Buat grup parameter klaster DB kustom.](#zero-etl.parameters)

1. [Buat sumber DB cluster](#zero-etl.create-cluster).

1. [Buat gudang data target untuk Amazon Redshift](#zero-etl-setting-up.data-warehouse) atau [Buat target Amazon SageMaker ](#zero-etl-setting-up.sagemaker) Lakehouse.

Setelah Anda menyelesaikan tugas-tugas ini, lanjutkan ke [Membuat integrasi nol-ETL Aurora dengan Amazon Redshift](zero-etl.creating.md) atau[Membuat integrasi Aurora Zero-ETL dengan lakehouse Amazon SageMaker](zero-etl.creating-smlh.md).

Anda dapat menggunakan AWS SDK untuk mengotomatiskan proses penyiapan untuk Anda. Untuk informasi selengkapnya, lihat [Menyiapkan integrasi menggunakan AWS SDK](#zero-etl.setup-sdk).

**Tip**  
Anda dapat meminta RDS menyelesaikan langkah-langkah pengaturan ini untuk Anda saat Anda membuat integrasi, daripada melakukannya secara manual. Untuk segera mulai membuat integrasi, lihat[Membuat integrasi nol-ETL Aurora dengan Amazon Redshift](zero-etl.creating.md).

Untuk Langkah 3, Anda dapat memilih untuk membuat gudang data target (Langkah 3a) atau target lakehouse (Langkah 3b) tergantung pada kebutuhan Anda:
+ Pilih gudang data jika Anda membutuhkan kemampuan pergudangan data tradisional dengan SQL-based analitik.
+ Pilih Amazon SageMaker Lakehouse jika Anda membutuhkan kemampuan pembelajaran mesin dan ingin menggunakan fitur lakehouse untuk ilmu data dan alur kerja ML.

## Langkah 1: Buat grup parameter klaster DB kustom
<a name="zero-etl.parameters"></a>

Integrasi Aurora Zero-ETL memerlukan nilai khusus untuk parameter cluster DB yang mengontrol replikasi. Secara khusus, Aurora MySQL memerlukan *binlog yang ditingkatkan* (`aurora_enhanced_binlog`), dan Aurora PostgreSQL memerlukan *replikasi logis yang ditingkatkan* (`aurora.enhanced_logical_replication`).

Untuk mengonfigurasi pencatatan log biner atau replikasi logis, Anda harus membuat grup parameter klaster DB kustom terlebih dahulu, lalu mengaitkannya dengan klaster DB sumber.

**Aurora MySQL (rangkaian aurora-mysql8.0**):
+ `aurora_enhanced_binlog=1`
+ `binlog_backup=0`
+ `binlog_format=ROW`
+ `binlog_replication_globaldb=0`
+ `binlog_row_image=full`
+ `binlog_row_metadata=full`

Selain itu, pastikan bahwa parameter `binlog_transaction_compression` *tidak* ditetapkan ke `ON`, dan bahwa parameter `binlog_row_value_options` *tidak* diatur ke `PARTIAL_JSON`.

Untuk informasi selengkapnya tentang binlog yang ditingkatkan Aurora MySQL, lihat [Menyiapkan binlog yang disempurnakan untuk Aurora MySQL](AuroraMySQL.Enhanced.binlog.md).

**Aurora PostgreSQL (keluarga aurora-postgresql16):**
+ `rds.logical_replication=1`
+ `aurora.enhanced_logical_replication=1`
+ `aurora.logical_replication_backup=0`
+ `aurora.logical_replication_globaldb=0`

Mengaktifkan replikasi logis yang disempurnakan (`aurora.enhanced_logical_replication`) akan selalu menulis semua nilai kolom ke log tulis depan (WAL) meskipun `REPLICA IDENTITY FULL` tidak diaktifkan. Ini mungkin meningkatkan IOPS untuk cluster DB sumber Anda.

**penting**  
Jika Anda mengaktifkan atau menonaktifkan parameter cluster `aurora.enhanced_logical_replication` DB, instans DB primer membatalkan semua slot replikasi logis. Ini menghentikan replikasi dari sumber ke target, dan Anda harus membuat ulang slot replikasi pada instance DB utama. Untuk mencegah interupsi, jaga agar status parameter tetap konsisten selama replikasi.

## Langkah 2: Pilih atau buat cluster DB sumber
<a name="zero-etl.create-cluster"></a>

Setelah Anda membuat grup parameter cluster DB kustom, pilih atau buat cluster Aurora . Cluster ini akan menjadi sumber replikasi data ke gudang data target. Anda dapat menentukan cluster DB yang menggunakan instans DB atau instans DB yang disediakan sebagai Aurora serverless sumbernya. Untuk instruksi untuk membuat cluster DB, lihat atau [Membuat cluster DB yang menggunakan Aurora serverless](aurora-serverless-v2.create.md). 

Database harus menjalankan versi mesin DB yang didukung. Untuk daftar versi yang didukung, lihat [Daerah yang Didukung dan mesin Aurora DB untuk integrasi Nol-ETL](Concepts.Aurora_Fea_Regions_DB-eng.Feature.Zero-ETL.md).

Saat Anda membuat database, di bawah **Konfigurasi tambahan**, ubah **grup parameter cluster DB** default ke grup parameter kustom yang Anda buat di langkah sebelumnya.

**catatan**  
Jika Anda mengaitkan grup parameter dengan cluster DB *setelah* cluster sudah dibuat, Anda harus me-reboot instance DB utama di cluster untuk menerapkan perubahan sebelum Anda dapat membuat integrasi nol-ETL. Untuk petunjuk, lihat [Mem-boot ulang klaster DB Amazon Aurora atau instans DB Amazon Aurora](USER_RebootCluster.md).

## Langkah 3a: Buat gudang data target
<a name="zero-etl-setting-up.data-warehouse"></a>

Setelah Anda membuat cluster DB sumber Anda, Anda harus membuat dan mengkonfigurasi gudang data target. Gudang data harus memenuhi persyaratan berikut:
+ Menggunakan tipe node RA3 dengan setidaknya dua node, atau Redshift Serverless.
+ Terenkripsi (jika menggunakan klaster yang disediakan). Untuk informasi selengkapnya, lihat [Enkripsi basis data Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html).

Untuk petunjuk cara membuat gudang data, lihat [Membuat klaster](https://docs.aws.amazon.com/redshift/latest/mgmt/create-cluster) untuk klaster terprovisi, atau [Membuat grup kerja dengan ruang nama](https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-console-workgroups-create-workgroup-wizard.html) untuk Redshift Nirserver.

### Aktifkan kepekaan huruf besar/kecil di gudang data
<a name="zero-etl-setting-up.case-sensitivity"></a>

Agar integrasi berhasil, parameter kepekaan huruf besar/kecil ([https://docs.aws.amazon.com/redshift/latest/dg/r_enable_case_sensitive_identifier.html](https://docs.aws.amazon.com/redshift/latest/dg/r_enable_case_sensitive_identifier.html)) harus diaktifkan untuk gudang data. Secara default, kepekaan huruf besar/kecil dinonaktifkan di semua klaster terprovisi dan grup kerja Redshift Nirserver.

Untuk mengaktifkan kepekaan huruf besar/kecil, lakukan langkah-langkah berikut bergantung pada jenis gudang data Anda:
+ **Klaster terprovisi** – Untuk mengaktifkan kepekaan huruf besar/kecil pada klaster terprovisi, buat grup parameter kustom dengan parameter `enable_case_sensitive_identifier` diaktifkan. Kemudian, hubungkan grup parameter dengan klaster. Untuk petunjuknya, lihat [Mengelola grup parameter menggunakan konsol](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-parameter-groups-console.html) atau [Mengonfigurasi nilai parameter menggunakan AWS CLI](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html#configure-parameters-using-the-clil). 
**catatan**  
Ingatlah untuk mem-boot ulang klaster setelah Anda mengaitkan grup parameter kustom dengannya.
+ **Grup kerja Nirserver** – Untuk mengaktifkan kepekaan huruf besar/kecil di grup kerja Redshift Nirserver, Anda harus menggunakan AWS CLI. Konsol Amazon Redshift saat ini tidak mendukung modifikasi nilai parameter Redshift Nirserver. Kirim permintaan [update-workgroup](https://docs.aws.amazon.com/cli/latest/reference/redshift-serverless/update-workgroup.html) berikut:

  ```
  aws redshift-serverless update-workgroup \
    --workgroup-name {{target-workgroup}} \
    --config-parameters parameterKey=enable_case_sensitive_identifier,parameterValue=true
  ```

  Anda tidak perlu mem-boot ulang grup kerja setelah Anda mengubah nilai parameternya.

### Konfigurasikan otorisasi untuk gudang data
<a name="zero-etl.setup-auth"></a>

Setelah Anda membuat gudang data, Anda harus mengkonfigurasi sumber Aurora DB cluster sebagai sumber integrasi resmi. Untuk petunjuknya, lihat [Mengonfigurasi otorisasi untuk gudang data Amazon Redshift Anda](https://docs.aws.amazon.com/redshift/latest/mgmt/zero-etl-using.setting-up.html#zero-etl-using.redshift-iam).

## Menyiapkan integrasi menggunakan AWS SDK
<a name="zero-etl.setup-sdk"></a>

Daripada menyiapkan setiap sumber daya secara manual, Anda dapat menjalankan skrip Python berikut untuk menyiapkan sumber daya yang diperlukan secara otomatis. Contoh kode menggunakan [AWS SDK untuk Python (Boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)untuk membuat sumber Amazon Aurora DB cluster dan gudang data target, masing-masing dengan nilai parameter yang diperlukan. Kemudian menunggu database tersedia sebelum membuat integrasi nol-ETL di antara mereka. Anda dapat menerapkan "comment out" pada berbagai fungsi tergantung pada sumber daya yang perlu Anda atur. 

Untuk menginstal dependensi yang diperlukan, jalankan perintah berikut:

```
pip install boto3
pip install time
```

Dalam skrip, secara opsional, Anda dapat memodifikasi nama grup sumber, target, dan parameter. Fungsi akhir akan membuat integrasi bernama `my-integration` setelah sumber daya disiapkan.

### Contoh kode Python
<a name="zero-etl.setup-sdk-python"></a>

------
#### [ Aurora MySQL ]

```
import boto3
import time

# Build the client using the default credential configuration.
# You can use the CLI and run 'aws configure' to set access key, secret
# key, and default Region.

rds = boto3.client('rds')
redshift = boto3.client('redshift')
sts = boto3.client('sts')

source_cluster_name = 'my-source-cluster' # A name for the source cluster
source_param_group_name = 'my-source-param-group' # A name for the source parameter group
target_cluster_name = 'my-target-cluster' # A name for the target cluster
target_param_group_name = 'my-target-param-group' # A name for the target parameter group

def create_source_cluster(*args):
    """Creates a source Aurora MySQL DB cluster"""

    response = rds.create_db_cluster_parameter_group(
        DBClusterParameterGroupName=source_param_group_name,
        DBParameterGroupFamily='aurora-mysql8.0',
        Description='For Aurora MySQL binary logging'
    )
    print('Created source parameter group: ' + response['DBClusterParameterGroup']['DBClusterParameterGroupName'])

    response = rds.modify_db_cluster_parameter_group(
        DBClusterParameterGroupName=source_param_group_name,
        Parameters=[
            {
                'ParameterName': 'aurora_enhanced_binlog',
                'ParameterValue': '1',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'binlog_backup',
                'ParameterValue': '0',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'binlog_format',
                'ParameterValue': 'ROW',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'binlog_replication_globaldb',
                'ParameterValue': '0',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'binlog_row_image',
                'ParameterValue': 'full',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'binlog_row_metadata',
                'ParameterValue': 'full',
                'ApplyMethod': 'pending-reboot'
            }
        ]
    )
    print('Modified source parameter group: ' + response['DBClusterParameterGroupName'])

    response = rds.create_db_cluster(
        DBClusterIdentifier=source_cluster_name,
        DBClusterParameterGroupName=source_param_group_name,
        Engine='aurora-mysql',
        EngineVersion='8.0.mysql_aurora.3.05.2',
        DatabaseName='myauroradb',
        MasterUsername='{{username}}',
        MasterUserPassword='{{Password01**}}'
    )
    print('Creating source cluster: ' + response['DBCluster']['DBClusterIdentifier'])
    source_arn = (response['DBCluster']['DBClusterArn'])
    create_target_cluster(target_cluster_name, source_arn, target_param_group_name)

    response = rds.create_db_instance(
        DBInstanceClass='db.r6g.2xlarge',
        DBClusterIdentifier=source_cluster_name,
        DBInstanceIdentifier=source_cluster_name + '-instance',
        Engine='aurora-mysql'
    )
    return(response)

def create_target_cluster(target_cluster_name, source_arn, target_param_group_name):
    """Creates a target Redshift cluster"""

    response = redshift.create_cluster_parameter_group(
        ParameterGroupName=target_param_group_name,
        ParameterGroupFamily='redshift-1.0',
        Description='For Aurora MySQL zero-ETL integrations'
    )
    print('Created target parameter group: ' + response['ClusterParameterGroup']['ParameterGroupName'])

    response = redshift.modify_cluster_parameter_group(
        ParameterGroupName=target_param_group_name,
        Parameters=[
            {
                'ParameterName': 'enable_case_sensitive_identifier',
                'ParameterValue': 'true'
            }
        ]
    )
    print('Modified target parameter group: ' + response['ParameterGroupName'])

    response = redshift.create_cluster(
        ClusterIdentifier=target_cluster_name,
        NodeType='ra3.4xlarge',
        NumberOfNodes=2,
        Encrypted=True,
        MasterUsername='{{username}}',
        MasterUserPassword='{{Password01**}}',
        ClusterParameterGroupName=target_param_group_name
    )
    print('Creating target cluster: ' + response['Cluster']['ClusterIdentifier'])
    
    # Retrieve the target cluster ARN
    response = redshift.describe_clusters(
        ClusterIdentifier=target_cluster_name
    )
    target_arn = response['Clusters'][0]['ClusterNamespaceArn']

    # Retrieve the current user's account ID
    response = sts.get_caller_identity()
    account_id = response['Account']

    # Create a resource policy specifying cluster ARN and account ID
    response = redshift.put_resource_policy(
        ResourceArn=target_arn,
        Policy='''
        {
            \"Version\":\"2012-10-17\",		 	 	 
            \"Statement\":[
                {\"Effect\":\"Allow\",
                \"Principal\":{
                    \"Service\":\"redshift.amazonaws.com\"
                },
                \"Action\":[\"redshift:AuthorizeInboundIntegration\"],
                \"Condition\":{
                    \"StringEquals\":{
                        \"aws:SourceArn\":\"%s\"}
                    }
                },
                {\"Effect\":\"Allow\",
                \"Principal\":{
                    \"AWS\":\"arn:aws:iam::%s:root\"},
                \"Action\":\"redshift:CreateInboundIntegration\"}
            ]
        }
        ''' % (source_arn, account_id)
    )
    return(response)

def wait_for_cluster_availability(*args):
    """Waits for both clusters to be available"""

    print('Waiting for clusters to be available...')

    response = rds.describe_db_clusters(
        DBClusterIdentifier=source_cluster_name
    )
    source_status = response['DBClusters'][0]['Status']
    source_arn = response['DBClusters'][0]['DBClusterArn']

    response = rds.describe_db_instances(
        DBInstanceIdentifier=source_cluster_name + '-instance'
    )
    source_instance_status = response['DBInstances'][0]['DBInstanceStatus']

    response = redshift.describe_clusters(
        ClusterIdentifier=target_cluster_name
    )
    target_status = response['Clusters'][0]['ClusterStatus']
    target_arn = response['Clusters'][0]['ClusterNamespaceArn']

    # Every 60 seconds, check whether the clusters are available.
    if source_status != 'available' or target_status != 'available' or  source_instance_status != 'available':
        time.sleep(60)
        response = wait_for_cluster_availability(
            source_cluster_name, target_cluster_name)
    else:
        print('Clusters available. Ready to create zero-ETL integration.')
        create_integration(source_arn, target_arn)
        return

def create_integration(source_arn, target_arn):
    """Creates a zero-ETL integration using the source and target clusters"""

    response = rds.create_integration(
        SourceArn=source_arn,
        TargetArn=target_arn,
        IntegrationName='{{my-integration}}'
    )
    print('Creating integration: ' + response['IntegrationName'])
    
def main():
    """main function"""
    create_source_cluster(source_cluster_name, source_param_group_name)
    wait_for_cluster_availability(source_cluster_name, target_cluster_name)

if __name__ == "__main__":
    main()
```

------
#### [ Aurora PostgreSQL ]

```
import boto3
import time

# Build the client using the default credential configuration.
# You can use the CLI and run 'aws configure' to set access key, secret
# key, and default Region.

rds = boto3.client('rds')
redshift = boto3.client('redshift')
sts = boto3.client('sts')

source_cluster_name = 'my-source-cluster' # A name for the source cluster
source_param_group_name = 'my-source-param-group' # A name for the source parameter group
target_cluster_name = 'my-target-cluster' # A name for the target cluster
target_param_group_name = 'my-target-param-group' # A name for the target parameter group

def create_source_cluster(*args):
    """Creates a source Aurora PostgreSQL DB cluster"""

    response = rds.create_db_cluster_parameter_group(
        DBClusterParameterGroupName=source_param_group_name,
        DBParameterGroupFamily='aurora-postgresql16',
        Description='For Aurora PostgreSQL logical replication'
    )
    print('Created source parameter group: ' + response['DBClusterParameterGroup']['DBClusterParameterGroupName'])

    response = rds.modify_db_cluster_parameter_group(
        DBClusterParameterGroupName=source_param_group_name,
        Parameters=[
            {
                'ParameterName': 'rds.logical_replication',
                'ParameterValue': '1',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'aurora.enhanced_logical_replication',
                'ParameterValue': '1',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'aurora.logical_replication_backup',
                'ParameterValue': '0',
                'ApplyMethod': 'pending-reboot'
            },
            {
                'ParameterName': 'aurora.logical_replication_globaldb',
                'ParameterValue': '0',
                'ApplyMethod': 'pending-reboot'
            }
        ]
    )
    print('Modified source parameter group: ' + response['DBClusterParameterGroupName'])

    response = rds.create_db_cluster(
        DBClusterIdentifier=source_cluster_name,
        DBClusterParameterGroupName=source_param_group_name,
        Engine='aurora-postgresql',
        EngineVersion='16.4.aurora-postgresql',
        DatabaseName='mypostgresdb',
        MasterUsername='{{username}}',
        MasterUserPassword='{{Password01}}**'
    )
    print('Creating source cluster: ' + response['DBCluster']['DBClusterIdentifier'])
    source_arn = (response['DBCluster']['DBClusterArn'])
    create_target_cluster(target_cluster_name, source_arn, target_param_group_name)

    response = rds.create_db_instance(
        DBInstanceClass='db.r6g.2xlarge',
        DBClusterIdentifier=source_cluster_name,
        DBInstanceIdentifier=source_cluster_name + '-instance',
        Engine='aurora-postgresql'
    )
    return(response)

def create_target_cluster(target_cluster_name, source_arn, target_param_group_name):
    """Creates a target Redshift cluster"""

    response = redshift.create_cluster_parameter_group(
        ParameterGroupName=target_param_group_name,
        ParameterGroupFamily='redshift-1.0',
        Description='For Aurora PostgreSQL zero-ETL integrations'
    )
    print('Created target parameter group: ' + response['ClusterParameterGroup']['ParameterGroupName'])

    response = redshift.modify_cluster_parameter_group(
        ParameterGroupName=target_param_group_name,
        Parameters=[
            {
                'ParameterName': 'enable_case_sensitive_identifier',
                'ParameterValue': 'true'
            }
        ]
    )
    print('Modified target parameter group: ' + response['ParameterGroupName'])

    response = redshift.create_cluster(
        ClusterIdentifier=target_cluster_name,
        NodeType='ra3.4xlarge',
        NumberOfNodes=2,
        Encrypted=True,
        MasterUsername='{{username}}',
        MasterUserPassword='{{Password01**}}',
        ClusterParameterGroupName=target_param_group_name
    )
    print('Creating target cluster: ' + response['Cluster']['ClusterIdentifier'])
    
    # Retrieve the target cluster ARN
    response = redshift.describe_clusters(
        ClusterIdentifier=target_cluster_name
    )
    target_arn = response['Clusters'][0]['ClusterNamespaceArn']

    # Retrieve the current user's account ID
    response = sts.get_caller_identity()
    account_id = response['Account']

    # Create a resource policy specifying cluster ARN and account ID
    response = redshift.put_resource_policy(
        ResourceArn=target_arn,
        Policy='''
        {
            \"Version\":\"2012-10-17\",		 	 	 
            \"Statement\":[
                {\"Effect\":\"Allow\",
                \"Principal\":{
                    \"Service\":\"redshift.amazonaws.com\"
                },
                \"Action\":[\"redshift:AuthorizeInboundIntegration\"],
                \"Condition\":{
                    \"StringEquals\":{
                        \"aws:SourceArn\":\"%s\"}
                    }
                },
                {\"Effect\":\"Allow\",
                \"Principal\":{
                    \"AWS\":\"arn:aws:iam::%s:root\"},
                \"Action\":\"redshift:CreateInboundIntegration\"}
            ]
        }
        ''' % (source_arn, account_id)
    )
    return(response)

def wait_for_cluster_availability(*args):
    """Waits for both clusters to be available"""

    print('Waiting for clusters to be available...')

    response = rds.describe_db_clusters(
        DBClusterIdentifier=source_cluster_name
    )
    source_status = response['DBClusters'][0]['Status']
    source_arn = response['DBClusters'][0]['DBClusterArn']

    response = rds.describe_db_instances(
        DBInstanceIdentifier=source_cluster_name + '-instance'
    )
    source_instance_status = response['DBInstances'][0]['DBInstanceStatus']

    response = redshift.describe_clusters(
        ClusterIdentifier=target_cluster_name
    )
    target_status = response['Clusters'][0]['ClusterStatus']
    target_arn = response['Clusters'][0]['ClusterNamespaceArn']

    # Every 60 seconds, check whether the clusters are available.
    if source_status != 'available' or target_status != 'available' or  source_instance_status != 'available':
        time.sleep(60)
        response = wait_for_cluster_availability(
            source_cluster_name, target_cluster_name)
    else:
        print('Clusters available. Ready to create zero-ETL integration.')
        create_integration(source_arn, target_arn)
        return

def create_integration(source_arn, target_arn):
    """Creates a zero-ETL integration using the source and target clusters"""

    response = rds.create_integration(
        SourceArn=source_arn,
        TargetArn=target_arn,
        IntegrationName='{{my-integration}}'
    )
    print('Creating integration: ' + response['IntegrationName'])
    
def main():
    """main function"""
    create_source_cluster(source_cluster_name, source_param_group_name)
    wait_for_cluster_availability(source_cluster_name, target_cluster_name)

if __name__ == "__main__":
    main()
```

------

## Langkah 3b: Buat AWS Glue katalog untuk integrasi Amazon SageMaker Lakehouse Zero-ETL
<a name="zero-etl-setting-up.sagemaker"></a>

Saat membuat integrasi nol-ETL dengan Amazon SageMaker Lakehouse, Anda harus membuat katalog terkelola di. AWS Glue AWS Lake Formation Katalog target harus berupa katalog terkelola Amazon Redshift. Untuk membuat katalog terkelola Amazon Redshift, pertama-tama buat peran terkait `AWSServiceRoleForRedshift` layanan. Di konsol Lake Formation, tambahkan `AWSServiceRoleForRedshift` sebagai administrator hanya-baca.

Untuk informasi selengkapnya tentang tugas sebelumnya, lihat topik berikut.
+ *Untuk informasi tentang membuat katalog terkelola Amazon Redshift, lihat [Membuat katalog terkelola Amazon Redshift di Panduan AWS Glue Data Catalog Pengembang](https://docs.aws.amazon.com/lake-formation/latest/dg/create-rms-catalog.html).AWS Lake Formation *
+ *Untuk informasi tentang peran terkait layanan untuk Amazon Redshift, [lihat Menggunakan peran terkait layanan untuk Amazon Redshift di Panduan Manajemen Pergeseran Merah Amazon](https://docs.aws.amazon.com/redshift/latest/mgmt/using-service-linked-roles.html).*
+ *Untuk informasi tentang izin administrator hanya-baca untuk Lake Formation, lihat [personas Lake Formation dan referensi izin IAM](https://docs.aws.amazon.com/lake-formation/latest/dg/permissions-reference.html) di Panduan Pengembang.AWS Lake Formation *

### Konfigurasikan izin untuk katalog target AWS Glue
<a name="zero-etl-setting-up.sagemaker-permissions"></a>

Sebelum membuat katalog target untuk integrasi nol-ETL, Anda harus membuat peran pembuatan target Lake Formation dan peran transfer data. AWS Glue Gunakan peran pembuatan target Lake Formation untuk membuat katalog target. Saat membuat katalog target, masukkan peran transfer data Glue di bidang **peran IAM** di **bagian Access from engine**.

#### Peran penciptaan target Lake Formation
<a name="zero-etl-setting-up.target-creation-role"></a>

Peran pembuatan target haruslah administrator Lake Formation dan memerlukan izin berikut.

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "lakeformation:RegisterResource",
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "s3:PutEncryptionConfiguration",
                "iam:PassRole",
                "glue:CreateCatalog",
                "glue:GetCatalog",
                "s3:PutBucketTagging",
                "s3:PutLifecycleConfiguration",
                "s3:PutBucketPolicy",
                "s3:CreateBucket",
                "redshift-serverless:CreateNamespace",
                "s3:DeleteBucket",
                "s3:PutBucketVersioning",
                "redshift-serverless:CreateWorkgroup"
            ],
            "Resource": [
                "arn:aws:glue:*:{{111122223333}}:catalog",
                "arn:aws:glue:*:{{111122223333}}:catalog/*",
                "arn:aws:s3:::*",
                "arn:aws:redshift-serverless:*:{{111122223333}}:workgroup/*",
                "arn:aws:redshift-serverless:*:{{111122223333}}:namespace/*",
                "arn:aws:iam::{{111122223333}}:role/GlueDataCatalogDataTransferRole"
            ]
        }
    ]
}
```

------

Peran penciptaan target harus memiliki hubungan kepercayaan berikut.

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "glue.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        },
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": "arn:aws:iam::{{111122223333}}:user/Username"
          },
          "Action": "sts:AssumeRole"
        }
    ]
}
```

------

#### Glue peran transfer data
<a name="zero-etl-setting-up.glue-data-transfer-role"></a>

Peran transfer data Glue diperlukan untuk operasi katalog MySQL dan harus memiliki izin berikut.

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

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "DataTransferRolePolicy",
            "Effect": "Allow",
            "Action": [
                "kms:GenerateDataKey",
                "kms:Decrypt",
                "glue:GetCatalog",
                "glue:GetDatabase"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

------

Peran transfer data Glue harus memiliki hubungan kepercayaan berikut.

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

****  

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

------

## Langkah selanjutnya
<a name="zero-etl.setup-next"></a>

Dengan sumber cluster Aurora DB dan gudang data target Amazon Redshift atau SageMaker Amazon Lakehouse, Anda dapat membuat integrasi nol-ETL dan mereplikasi data. Untuk petunjuk, lihat [Membuat integrasi nol-ETL Aurora dengan Amazon Redshift](zero-etl.creating.md).