Are there any good docs on how to give permissions...
# help
w
Are there any good docs on how to give permissions to a lambda to an existing RDS db? I keep coming back to https://docs.serverless-stack.com/util/Permissions#permissiontype which shows “permissions” doesn’t support it. I can’t use https://docs.serverless-stack.com/constructs/RDS from https://github.com/serverless-stack/serverless-stack/blob/master/examples/rest-api-postgresql/stacks/MyStack.js because it’s an existing DB so don’t want to create a new one.
t
are you using data api?
if not you can't use aws permissions to grant access
w
I guess looking how we did it with serverless is to use security groups
t
yeah in CDK you can grant access from ip ranges
but this also means your lambda needs to be in a VPC in production
w
Yes, was adding the lambda to the vpc
Ok. Thanks. I’ll play around more. Was just wondering if there was some nice doc on it somewhere.
t
using lambdas with RDS comes up a lot, we should probably write an overarching guide for it
few different ways to go about it
w
That’d be nice. 🙂