Cannot launch MySQL 5.6 from S3 - S3_SNAPSHOT_INGESTION

0

I'm bumping into this error when trying to launch RDS MySQL 5.6 instance from S3-stored backup.

IAM role ARN value is invalid or does not include the required permissions for: S3_SNAPSHOT_INGESTION (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 4e5a7f79-23ed-4e13-b5c1-2d35f4571de7)

My role has ALL RDS rights and ALL S3 rights attached to it. (Not just the ones described in the official "Importing Data into an Amazon RDS MySQL DB Instance " guide).

Help?!
//JoNi

J_N__
질문됨 6년 전2467회 조회
2개 답변
0

I missed this one Example Permissions Policy for Importing from Amazon S3 — IAM User Permissions

{
    "Version":"2012-10-17",
    "Statement":
    [
        {
            "Sid":"AllowS3AccessRole",
            "Effect":"Allow",
            "Action":"iam:PassRole",
            "Resource":"arn:aws:iam::IAM User ID:role/S3Access"
        }
    ]
}
J_N__
답변함 6년 전
0

The root cause for this issue was required permissions missing for the RDS to read something from S3 bucket. But before actually adding permission for the RDS, the user who is creating this RDS need to have required permissions to delicate RDS with proper permission. If you are getting confused, its like the AWS user has to have the required permission to create roles for the RDS.

  1. The AWS user should have "iam:Passrole" policy attached as part of the IAM role.
    for a user to associate an IAM role with an S3 bucket, the IAM user must have the iam:PassRole permission for that IAM role. This permission allows an administrator to restrict which IAM roles a user can associate with S3 buckets.
  2. Now while creating the RDS use "Create a new role" from the IAM role section. & then check the inline policy auto-generated from the "View policy document". It should be something like :
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Effect": "Allow",
    "Action": [
    "s3:ListBucket",
    "s3:GetBucketLocation"
    ],
    "Resource": [
    "arn:aws:s3:::<bucket name>"
    ]
    },
    {
    "Effect": "Allow",
    "Action": [
    "s3:GetObject"
    ],
    "Resource": [
    "arn:aws:s3:::<bucket name>/<prefix>*"
    ]
    }
    ]
    }

& finally you are good to go.

For more details please go through https://docs.aws.amazon.com/dms/latest/sbs/CHAP_MySQL2Aurora.html

Edited by: saibaldey on Jul 27, 2020 9:39 AM

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠