Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying to "private" API Gateway with dedicated VPC endpoint #897

Closed
arnaudsj opened this issue Jul 12, 2018 · 9 comments
Closed

Deploying to "private" API Gateway with dedicated VPC endpoint #897

arnaudsj opened this issue Jul 12, 2018 · 9 comments

Comments

@arnaudsj
Copy link

@arnaudsj arnaudsj commented Jul 12, 2018

Hi,

I have created a dedicated VPC endpoint in order to be able to deploy a Chalice micro-service to a private API Gateway instance (meaning only accessible on a particular VPC within AWS), but I am not seeing anything in the document, nor issues which outlines how it is possible or not to specify the API Gateway resource policy (where you normally specify the VPC endpoint). I am following AWS's documentation here: https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-private-apis.html#apigateway-private-api-set-up-resource-policy

Thank you in advance for any pointers or guidance.

@kyleknap
Copy link
Member

@kyleknap kyleknap commented Jul 25, 2018

Marking as a feature request. Unfortunately creating your own API Gateway private endpoint is not supported in Chalice yet. Chalice currently only supports running a Lambda function in your own VPC, but I do think it would be really valuable to be able to setup a private endpoint as well.

@dhruvsakalley
Copy link

@dhruvsakalley dhruvsakalley commented Jul 25, 2018

Currently creating open API endpoints causes internet traversals adding network latency ~100ms on top of lambda execution, also a lot of our API's are internal facing and not exposed to public endpoints. This feature if implemented will increase chalice usage to a great extent for anyone who's developing micro-services which are consumed internally and would be able to do so with low latency.

@mtslzr
Copy link

@mtslzr mtslzr commented Aug 3, 2018

Would also love to see this added. As-is, chalice deploy wipes any existing resource policy, forcing us to trigger a second deploy to add the policy and re-deploy the API after Chalice does its thing. This would be incredibly useful for any internally-used APIs.

@schwartzie
Copy link

@schwartzie schwartzie commented Aug 14, 2018

Just fixing the issue that @mtslzr noted with chalice deploy clearing out an existing API Gateway Resource Policy would allow us to manually make an API Gateway private while still getting the convenience of the rest of chalice deploy.

@dhruvsakalley
Copy link

@dhruvsakalley dhruvsakalley commented Aug 24, 2018

Bump, I'm wondering if this can be marked important, an identical issue on SAM was aws/serverless-application-model#480 increased in priority. If this is going to take a lot of time to get done, I would appreciate some workarounds. Currently it's a showstopper for adoption of chalice in our deploy pipeline.

@markwatson
Copy link

@markwatson markwatson commented Dec 13, 2018

After digging through the code, it looks like adding this would require swagger support for this functionality. Or are there options in the code for setting custom ApiGateway options? Sorry, I'm still learning the codebase!

@HarryCaveMan
Copy link

@HarryCaveMan HarryCaveMan commented Feb 22, 2019

After a little more digging, tit seems this might be added to chalice package by adding EndpointConfiguration and Policy to the config and properly applying it in the _generate_restapi method in package.py I will dig a little more to find out how it could be added to chalice deploy

@HarryCaveMan
Copy link

@HarryCaveMan HarryCaveMan commented Mar 1, 2019

Tagged this in #976 because we will need the ability to attach a resource policy for the VPCE. With chalice deploy, the RestAPI resource is initially created using import_rest_api() which supports private endpoint configuration but not attaching a resource policy. Either that part will need to be refactored to use create_rest_api(), or there will have to be an update_rest_api() call after the fact to attach the resource policy for the VPCE.

@kapilt
Copy link
Contributor

@kapilt kapilt commented Jul 5, 2019

added a pr that will allow deploying to private api endpoints (api endpoint configuration type), however this won't configure a vpc endpoint as that resource is shared across multiple apis and has variance for vpc/subnet/security groups independent of chalice configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

8 participants
You can’t perform that action at this time.