Python Libraries required ‘psycopg2’ĭatetime_object = () ![]() # Name : Load Dataset from AWS S3 bucket to your Redshift Cluster Increase Timeout & Memory of Lambda Function And Change Your Cluster and Bucket Details AccordinglyĪdd a Cloud Watch Event Trigger with Cron Expression : cron(0 2 ? * FRI *) “Resource”: “arn:aws:iam::80xxxxx11:role/RoleB”Ĭ) Create policy and Save it to role Part B: Deploy a Lambda Function Using Attached Code(S3-to-Redshift.zip). Step 3: Go back to Account under which Redshift Cluster is createdĪ) Go to IAM > Roles > Select role which you created earlier “RoleA”ī) Add inline policy to this role and add the below policy and save it Step 2: In account which has the S3 Bucket Account 8xxxxxxxx11, do this:ī) Select the JSON tab and add below IAM policy, replace my bucket name ‘shadmha-us-east-2’ with your bucket nameĬhose Review Policy & Save the policy as let’s say ‘s3-cross-account-policy’Ĭ) Go to Roles > Create Role > Select type of trusted entity as ‘Another AWS Account’ tabĭ) Enter Account ID of Redshift Cluster Account ‘24xxxxxx16’ > Permissions > Search policy created in a) “s3-cross-account-policy’Į) Go next > create role > save it as “RoleB”į) Go to Roles > Select “RoleB” > “Trust Relationships” tab > Edit trust telationships. Goto Redshift Console > Select Cluster > Manage IAM > Add “RoleA” to Cluster Step 1: In Redshift Cluster Account 24xxxxxx16, do thisī) Create Role > Redshift > Redshift – Customizable.Ĭ) No need to add policies or tags, go ahead and save this role as “RoleA”ĭ) Add this role to your Redshift cluster. ![]() Unload Data from Redshift Cluster to S3 bucket in different account Read Data from S3 Bucket in different account into Spectrum TableĢ. Part A : Create Redshift Spectrum Cross-Account Access for S3Ĭompany Account A: Redshift Cluster Account: 24xxxxxx16Ĭompany Account B: S3 Bucket Account: 8xxxxxxxx11īucket Name (Create with Option “Requestor Pays”): s3://shadmha-us-east-2
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |