Restore SQL Server database backup file (.bak) to AWS RDS instance. (see how to restore here)
After run the restore command, the restoring task was failed with the error message below.
(see error message by running: exec msdb.dbo.rds_task_status @task_id = 8)
Error message:
[2020-02-17 13:06:22.063] Aborted the task because of a task failure or a concurrent RESTORE_DB request.
[2020-02-17 13:06:22.097] Task has been aborted [2020-02-17 13:06:22.097] Access Denied
Possible solutions:
1. If you don't use Master:
GRANT EXECUTE ON dbo.rds_restore_database to [USERNAME]
2. 1. If you use Master:
Creating an IAM Policy to Access Amazon S3 Resources
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.IAM.S3CreatePolicy.html
Creating an IAM Role to Allow Amazon Aurora to Access AWS Services
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.IAM.CreateRole.html
Add role to the DB instance
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.IAM.AddRoleToDBCluster.html
3. Another option: The bak file is not valid or encrypted.
(try to restore other bak and see if it also failed).