Grant Firehose access to replicate database changes to Apache Iceberg Tables
Note
Firehose supports database as a source in all Amazon Web Services Regions
You must have an IAM role before you create a Firehose stream and Apache Iceberg Tables using Amazon Glue. Use the following steps to create a policy and an IAM role. Firehose assumes this IAM role and performs the required actions.
-
Sign in to the Amazon Web Services Management Console and open the IAM console at https://console.amazonaws.cn/iam/
. -
Create a policy and choose JSON in policy editor.
-
Add the following inline policy that grants Amazon S3 permissions like the read/write permissions, permissions to update the table in the data catalog etc.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "glue:GetTable", "glue:GetDatabase", "glue:UpdateTable", "glue:CreateTable", "glue:CreateDatabase" ], "Resource": [ "arn:aws:glue:<region>:<aws-account-id>:catalog", "arn:aws:glue:<region>:<aws-account-id>:database/*", "arn:aws:glue:<region>:<aws-account-id>:table/*/*" ] }, { "Effect": "Allow", "Action": [ "s3:AbortMultipartUpload", "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:PutObject", "s3:DeleteObject" ], "Resource": [ "arn:aws:s3:::amzn-s3-demo-bucket", "arn:aws:s3:::amzn-s3-demo-bucket/*" ] }, { "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": [ "arn:aws:kms:<region>:<aws-account-id>:key/<key-id>" ], "Condition": { "StringEquals": { "kms:ViaService": "s3.region.amazonaws.com" }, "StringLike": { "kms:EncryptionContext:aws:s3:arn": "arn:aws:s3:::amzn-s3-demo-bucket/prefix*" } } }, { "Effect": "Allow", "Action": [ "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:<region>:<aws-account-id>:log-group:<log-group-name>:log-stream:<log-stream-name>" ] }, { "Effect": "Allow", "Action": "secretsmanager:GetSecretValue", "Resource": "<Secret ARN>" }, { "Effect": "Allow", "Action": [ "ec2:DescribeVpcEndpointServices" ], "Resource": [ "*" ] } ] }