question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding VPC Gateway Endpoint to VPC created fromLookup fails

See original GitHub issue

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.

  • I’m submitting a …

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

Adding a VPC gateway type endpoint to a VPC referenced by Vpc.fromLookup fails with AttributeError: '_IVpcProxy' object has no attribute 'add_gateway_endpoint'

Python code;

vpc = ec2.Vpc.from_lookup(self, "VPC", is_default=True)

s3_endpoint = vpc.add_gateway_endpoint('S3Endpoint', 
    service=ec2.GatewayVpcEndpointAwsService('s3'))

Similar error message using vpc. add­_s3­_endpoint().

though ,

storage_gateway_endpoint = vpc.add_interface_endpoint('StorageGatewayEndpoint', 
            service=ec2.InterfaceVpcEndpointAwsService('storagegateway'))

is successful.

  • What is the expected behavior (or behavior of feature suggested)?

  • What is the motivation / use case for changing the behavior or adding this feature?

  • Please tell us about your environment:

    • CDK CLI Version: 1.2.0
    • Module Version: xx.xx.xx
    • OS: [all | Windows 10 | OSX Mojave | Ubuntu | etc… ]
    • Language: [ Python ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
urosn74commented, Aug 30, 2021

For what is worth, in my case it helped when I deleted cdk.context.json.

2reactions
ozahavicommented, Jan 18, 2021

Still having a problem when trying to add a gateway endpoint to a VPC that was imported using “vpc.fromLookup”. Error message: ‘Can’t add a gateway endpoint to VPC; route table IDs are not available’.

CDK 1.84, MacOS BigSur, Node 12.18.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot gateway and interface VPC endpoints
When creating the gateway endpoint, select the route tables that the routes to the service will be installed on. Make sure that the...
Read more >
aws-cdk.aws-ec2 - PyPI
If your VPC is created outside your CDK app, you can use Vpc.fromLookup() . The CDK CLI will search for the specified VPC...
Read more >
How can I reference an existing VPC Endpoint in AWS CDK?
msshenke's answer returns Ivpc what I needed was vpc endpoint reference. This is what I found.
Read more >
awslabs/aws-cdk - Gitter
The dummy vpc from the VPC.fromLookup and the newly created VPC. These two stacks seem to be confusing the synthesizer (see error below)....
Read more >
Cdk use existing vpc - cattolimonica.it
Vpc. But what if you already created VPC for your network, below is one of the way to use it. For us to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found