DescribeDBCluster permission error when adding datasource

1

I am trying to add a datasource to my new GraphQl API using the "amplify api add-graphql-datasource" command. I am receiving the following error when I do.

User: arn:aws:sts::101821158090:assumed-role/us-west-2_2vJlh9y73_Full-access/amplifyadmin is not authorized to perform: rds:DescribeDBClusters on resource: arn:aws:rds:us-west-2:101821158090:cluster:* because no identity-based policy allows the rds:DescribeDBClusters action

I can't seem to find the right role with the DescribeDBClusters action.

1개 답변
0

Hi,

Fortunately IAM Error messages are straightforward. We can see in the error message is described as "because no identity-based policy allows the rds:DescribeDBClusters action" - which means that the role you were using did not have rds:DescribeDBClusters as a permission in it's IAM policy, for example:


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "rds:DescribeDBClusters"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

To solve this issue you can do two things:

  1. You can attach an AWS Managed IAM Policy to your role which will grant the permissions needed to perform that action, for example the "AmazonRDSReadOnlyAccess" policy. You can also attach other Managed Policies if you require additional permissions, such as "AmazonRDSFullAccess"
  2. From the IAM console, you can create a new policy [https://us-east-1.console.aws.amazon.com/iam/home#/policies$new?step=edit]. Using either the visual editor, or the JSON editor, you can then specify the permissions you need for accessing your RDS resources.

If you're not sure what permissions are needed, then please have a look at this document:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/security_iam_id-based-policy-examples.html

Hope this helps :)

AWS
Michael
답변함 일 년 전

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

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

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

관련 콘텐츠