Invoking Lambda functions from Aurora PostgreSQL fails

0

Hi all,

This is something that was working months ago, but suddenly is not working anymore. When invoking a Lambda from the database either using SELECT * FROM aws_lambda.invoke(<function_arn>, '{"body": "Hello from Postgres!"}'::json); or SELECT * from aws_lambda.invoke(aws_commons.create_lambda_function_arn(<function_arn>), '{"body": "Hello from Postgres!"}'::json);

it fails with the message: SQL Error [XX000]: ERROR: unable to access credentials stored with the database instance

The DB cluster and function are in the same account and region. We have checked the cluster permissions and role that it has access, according to https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/PostgreSQL-Lambda.html, but we haven't figured yet what's wrong.

Does anyone have any recommendation on where to find a more detailed error message, or what else could help us solve the issue? Thanks.

EDIT: the team has now successfully configured a new role and policy according to the directions on the web page, and attached it to the cluster instead of the previous role, and it just worked with the same permissions as before. I believe somehow the database was not refreshing what we were doing, or there is some other internal bug in Aurora that was preventing the correct role assumption.

1回答
0

Hello.

Will the error be resolved if I restart RDS?

profile picture
エキスパート
回答済み 8ヶ月前
  • Hi Riku, thanks for your comment. What I had tested (and it didn't work) was a reboot of the single instance in the cluster. As mentioned in the original post (EDIT), the issue was temporarily solved with a new role.

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

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

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

関連するコンテンツ