Copy from S3 parquet to Redshift table

0

Hi!
I tried to copy parquet files from S3 to Redshift table but instead I got an error:

  Invalid operation: COPY from this file format only accepts IAM_ROLE credentials

I provide User credentials what should work according to that document: https://docs.aws.amazon.com/redshift/latest/dg/copy-usage_notes-copy-from-columnar.html
"COPY command credentials must be supplied using an AWS Identity and Access Management (IAM) role as an argument for the IAM_ROLE parameter or the CREDENTIALS parameter."

My code:

COPY {table_name}
FROM {path_to_s3}
CREDENTIALS 'aws_access_key_id=...;aws_secret_access_key=...'
FORMAT PARQUET
;

Is it possible to load parquet data using user credentials ?

質問済み 5年前2626ビュー
1回答
0

"COPY command credentials must be supplied using an AWS Identity and Access Management (IAM) role as an argument for the IAM_ROLE parameter or the CREDENTIALS parameter."
You must use a role but you can declare the role to either the IAM_ROLE or CREDENTIALS parameters.

CREDENTIALS 'aws_iam_role=arn:aws:iam::<aws-account-id>:role/<role-name>'
IAM_ROLE 'arn:aws:iam::<aws-account-id>:role/<role-name'

I recommend that you transition to using IAM roles for access control in general, rather than embedding keys in your processes.

回答済み 5年前
  • I found the problem in our upload code, the target table has a TIME column which is not supported.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ