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.

[pipelines] Metadata errors should fail synthesis (on stacks deployed in the pipeline)

See original GitHub issue

This issue is similar to https://github.com/aws/aws-cdk/issues/5594 however, occurs without nested stacks. Instead, I have a cross-account CdkPipeline setup according to the minimal example from the documentation. My Stack consists only of a simple VPC.

When deploying, the CloudFormation template in the target account still contains the dummy1a, dummy1b etc. AZs. Finally, these are reported as invalid and my stack is rolled back.

Reproduction Steps

pipeline.addApplicationStage(new MyApplication(this, 'Dev', {
      env: {
        account: '11111111111',
        region: 'eu-west-1',
      }
    }));

Where MyApplication consist of a single stack with only new VPC(this, 'VPCName')

Error Log

Value (dummy1a) for parameter availabilityZone is invalid. Subnets can currently only be created in the following availability zones: eu-west-1a, eu-west-1b, eu-west-1c. (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue

Environment

  • CLI Version : 1.54.0
  • Framework Version: 1.54.0
  • Node.js Version: 14.4.0
  • OS :
  • Language (Version): TypeScript (3.8.3)

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:36
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

8reactions
J11522commented, Aug 24, 2020

@moshir Try setting the AZs in your context. You can do this through the context file very easily:

{
  "availability-zones:account=<your account id>:region=eu-west-1": [
    "eu-west-1a",
    "eu-west-1b",
    "eu-west-1c"
  ]
}
2reactions
victoravrcommented, Oct 30, 2020

Pipelines does not currently support lookups.

(From the blog)

Developer preview limitations CDK Pipelines is currently in developer preview. AWS is working to lift some limitations, but you should keep the following in mind:

No context queries – Context queries are not supported. That means that Vpc.fromLookup() and other functions like it don’t work.

Are there any plans to support lookups like @aws-cdk/aws-ec2.Vpc.fromLookup() in @aws-cdk/pipelines anytime soon?

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/pipelines module - AWS Documentation - Amazon.com
Deploying your application continuously starts by defining a MyApplicationStage , a subclass of Stage that contains the stacks that make up a single...
Read more >
Pipeline troubleshooting and debugging | Cloud Dataflow
Best practices for pipelines; Check your pipeline's status; Find information about pipeline failures. Check job error messages; View step logs for your job....
Read more >
CDK Pipelines and CloudFormation linting - Oblivion
This bucket will be deployed via CDK pipelines to have the ... here is to test and let the pipeline run fails on...
Read more >
Working on aws CodePipelines, Stack Creation failed every time
You need to delete the Cloud Formation stack, before trying again. Go to Cloud Formation service in AWS console. You will be able...
Read more >
How to Define Cloud Infrastructure with the AWS Cloud ...
After learning the basics of the AWS CDK, Matt will take you on a speedrun of the ... This error would be thrown...
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