-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(ec2): interface endpoint AZ lookup does not guard against broken situations #12033
Conversation
Pull request has been modified.
I am not sure why this changed, I didn't do it -- I promise!
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@rix0rrr any update on this? |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
lookupSupportedAzs
can create a VPC endpoint object with no subnets, or fewer subnets than expected, if AZs are not resolved (i.e. they are Tokens). This can create deployment-time failures if all the VPC subnets are filtered out.This is not a problem with stock CDK, this is a problem with third-party CDK libraries that do not provide concrete AZs (us-east-1a, us-east-1b) for subnets, even though the account and region are specified.
A less common problem is that
lookupSupportedAzs
can return no subnets if there is no overlap between the user's VPC AZs and the AZs of a service they're connecting to. This also results in a deployment-time failure.This commit adds error checking to make sure that all subnet AZs are concrete values when using
lookupSupportedAzs
, and also throws an error if the user inadvertently attempts to create a VPC endpoint with no subnets.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license