berenddeboer / cdk-rds-sql

A CDK construct that allows creating roles and databases an on Aurora Serverless Postgresql cluster.
Apache License 2.0
23 stars 11 forks source link

lambda in isolated network will fail to get secret #14

Closed gdamjan closed 6 months ago

gdamjan commented 6 months ago

feat: place sql lambda handler explicitly in a private isolated network

this will break getting the RDS Secret unless you have also enabled the VPC endpoint for secrets manager. at minimum, this dependency will need to be documented.

ww-daniel-mora commented 6 months ago

@gdamjan I may be running into this issue. Could you please add an example for how you resolved this?

gdamjan commented 6 months ago

@gdamjan I may be running into this issue. Could you please add an example for how you resolved this?

you can explicitly specify the subnet where the lambda will run or add a secretsmanager vpc endpoint

ww-daniel-mora commented 6 months ago

@gdamjan I've explicitly placed the lambda in the same subnet as the database which, like the example, is maked PRIVATE_ISOLATED and I suspect that is blocking the retrieval of secrets. An example of how to

add a secretsmanager vcp endpoint

would be very helpful. I've been spending a few days reading up on VPC terminology to in an attempt to do just that.

berenddeboer commented 6 months ago

@ww-daniel-mora have added an example to the docs. Let me know if this worked!