0
SELECT * FROM aws_lambda.invoke(
  'arn:aws:lambda:us-west-2:123456789012:function:spark-ods-lambda-preprod-myETLTest',
  '{"body": "Hello from Postgres!"}'::JSON,
  'us-west-2',
  'DryRun'
);

[2021-08-05 22:29:36] [XX000] ERROR: invoke API failed
[2021-08-05 22:29:36] Detail: AWS Lambda client returned 'Unable to connect to endpoint'.

IAM role with correct policy attached to RDS instance confirmed with Access Advisor. Interface endpoint for Lambda set up in VPC/subnets. Lamba test runs successfully. Can't find anything on the interwebs (even this forum). Any help appreciated.

2

We just had the same issue and managed to get it fixed after digging for few hours.

What we have done is basically include an Outbound rules (443) in our database Security Group.

Invocation just went through after that.

I guess it is because the invocation is FROM postgreSQL TO lambda.

Hope this helps the next reader.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.