getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
920 stars 112 forks source link

[Server-side website] | [Simple function] : in VPC, could you add endpoint gateway #114

Open piolet opened 3 years ago

piolet commented 3 years ago

Hi all, When using a Lambda in a VPC, I understand that it is cut off from the internet. To avoid having to add a NAT Gateway, would it be possible to add a parameter to the constructor (an array of endpoints) to create a gateway to these different endpoints? I mention in the title the Server-Side Website construct, but this is mostly valid for simple functions.

I don't know if it is possible via LIFT or if it should be managed only via resources

to discuss it

t-richard commented 3 years ago

You're talking about S3 and DynamoDB gateway endpoints ?

piolet commented 3 years ago

You're talking about S3 and DynamoDB gateway endpoints ?

yes, i talk about S3 (for the moment) i can access to my RDS (same VPC).

Maybe, in future, i'll use "Queue construct" to delegate the sending of emails. in this case, maybe I will have to have an endpoint to my queue (which will be outside the VPC, because the associated function will need internet to send the mails) But I'm not there yet. Hence my anticipation when talking about the endpoint list

t-richard commented 3 years ago

At the moment, AWS only supports S3 and Dynamo endpoints IIRC.

From my own experience, you often end up needing internet access anyway to reach third-party APIs, monitoring tools (eg. Sentry), email providers, etc

piolet commented 3 years ago

Thanx.

Just internet gateway or NAT gateway ?