cdk.context.json is not created. #26410
-
Hi everyone, I have some troubles trying to run an existing project. The code is trying to create an VPC endpoint, but I receive the following error: RuntimeError: Can't add a gateway endpoint to VPC; route table IDs are not available Before this creation, there is a ec2.Vpc.from_lookup call to get the VPC information. As I understand, there must be a cdk.context.json with the VPC information, but is not creating the file. I think I have setted all the environment variables to run the code:
the code is searching with the correct information:
when I try to run the cdk list I'm getting the following output:
The VPC exists in the region and the name is correct, I have permissions as administrator in the account. Is there something that I forgot to set? Any env variable? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Couple things to check/try:
|
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
-
In my case, the cdk-synth STOPPED updating To the point noted by @peterwoodworth .. In my case, I could clearly see the following:
FYI: My env = Environment(
account=os.environ["CDK_DEFAULT_ACCOUNT"],
region=os.environ["CDK_DEFAULT_REGION"],
) $ npx cdk --version
2.1005.0 (build be378de) I printed out UpdateRunning the following command .. got rid of that (above noted) error message.
But, STILL --NO-- ❌ cdk.context.json !! |
Beta Was this translation helpful? Give feedback.
Couple things to check/try:
cdk synth -v
instead, I'm not familiar with exactly whatcdk list
does under the hood off the top of my headcdk synth -v
. Does the file get generated then? If so, you're probably running into the same bug as described here