Serverless-rds-internet-access Sample

This is a sample implementation which shows an example of how to setup a serverless project which allows your lambda(s) to connect to both an RDS instance from within a VPC as well as connecting out to the internet. If you don't have much experience working with configuring VPCs or networking rules this will should provide a boilerplate example to get you started with (and is a product of my own initial journey trying to understand and set this up myself).

There is only a small collection of literature about why this is tricky to do and also why you need to do it at all. I won't repeat what's already been written, but it's worth having a read through of some of these resources:

This snippet also borrows heavily from other example configs and setups provided by other developers out there. This setup borrows heavily from:

Setup

Install your dependancies
npm install
Deploy
sls deploy

What do you get?

The