Can't connect lambda to RDS Proxy

0

Hi,

I have set up a lambda function to connect to an rds proxy. I can connect directly to the database but not the proxy. I have:

  1. Added it through the rds using connected compute service
  2. Put everything in a single vpc and adjusted the inbound/outbound rules
  3. Adjusted the iam to include AWSLambdaVPCAccessExecutionRole and AWSLambdaBasicExecutionRole

I am also getting the warning that: "Function execution role: iamRole does not have the required permission for RDS proxy: proxyname" (I have anonymized the execution role and proxy name).

質問済み 2ヶ月前250ビュー
1回答
1

Hello.

Is IAM authentication enabled on RDS Proxy?
If IAM authentication is enabled, the IAM policy "rds-db:connect" is required in the Lambda IAM role.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.IAMPolicy.html
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy-setup.html#rds-proxy-connecting-iam

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "rds-db:connect"
            ],
            "Resource": [
                "arn:aws:rds-db:ap-northeast-1:AWS-Account-ID:dbuser:prx-ABCDEFGHIJKL01234/proxy_user"
            ]
        }
    ]
}

If you want to connect using only password authentication, please disable IAM authentication with RDS Proxy.

profile picture
エキスパート
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
  • Hello. IAM authentication is not enabled.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ