Spooling or exporting RDS / Postgresql data to S3 – here is one way

   • Create IAM role with a policy that allows

       Aurora to write to the given S3 bucket

   • Attach the role to the Aurora cluster

           • add the role ARN to a cluster parameter group and

               attach the parameter group to the Aurora Cluster

set

                     Parameter Group one of the two parameters

 aurora_select_into_s3_role = <Role_ARN>

                                 OR

      aws default s3 role = <Role ARN>

then

SELECT * FROM b.table INTO OUTFILE S3
fields terminated by ','
lines terminated by '\n'

Leave a Comment

Scroll to Top