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

VPCEndpoint trying to create even if "createVpcEndpoints": false #482

Open
BryceViva opened this issue May 7, 2024 · 3 comments
Open

VPCEndpoint trying to create even if "createVpcEndpoints": false #482

BryceViva opened this issue May 7, 2024 · 3 comments

Comments

@BryceViva
Copy link

I have the config set to be privatewebsite = true and "createVpcEndpoints": false, but when I run CDK Deploy, It still tries to deploy a VPCEndpoint. I am unable to deploy endpoints in the environment this is going.

Am I missing some flag to make sure an Endpoint isn't going to be created?

Thanks for all help.

@kmanuwai
Copy link
Contributor

kmanuwai commented Jun 4, 2024

The definition of a private website here is that the website will only be accessible from the VPC or any client (i.e. on a VPN) that can reach the internal only Application Load Balancer that sits in front of the S3 hosted website.

So you need VPC Endpoints to be deployed for that to work. I.e. privatewebsite = true will overpower "createVpcEndpoints": false

See here for more details: https://aws-samples.github.io/aws-genai-llm-chatbot/documentation/private-chatbot.html

@BryceViva
Copy link
Author

Is it possible to use an existing VPC endpoint?

@kmanuwai
Copy link
Contributor

kmanuwai commented Jun 4, 2024

You should be able to use existing VPC endpoints although I have not tested this.
If you remove the endpoints you don't want created from here:

if (
typeof props.config.vpc?.createVpcEndpoints === "undefined" ||
props.config.vpc?.createVpcEndpoints === true

Then in this part of the code, your already existing VPC endpoint should be picked up:

// Retrieving S3 Endpoint Ips for ALB Target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants