1
votes

i'm trying to upload a csv file from S3 to Aurora using the 'Load Data From S3' command in MySQL workbench. Keep getting the error 'S3 API returned error; missing credentials; cannot instantiate S3 client'.

I'm attaching AWServiceRole for RDS to the Aurora RDS cluster - because this is the only RDS Role I can create - and updating the DB cluster parameters to point at the new role but still getting the issue.

Problem seems to be because I can't attach an S3 bucket policy to the RDS Service Role. I can't add for example 'S3FullAccess' policy to the AWS RDS Service Role as the console physically doesn't let me attach a policy.

I'm using compatible version of MySQL / Aurora etc. Accessing as IAM user with full admin rights.

I've searched the forums but everybody else seems to be able to create a normal role and attach an S3 bucket policy.

Any help would be really appreciated. Really frustrating.

Thanks in advance for your help.

1

1 Answers

0
votes

Follow this guide: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.IAM.CreateRole.html

You select the "RDS - CloudHSM and Directory Service" use case. Once that role is created, you remove the default policys and then add your own S3 policy to it. You'll then be able to attach this IAM Role to the RDS cluster. You'll also want to put this role ARN on the cluster parameters for the various s3 roles.