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

ec2.Vpc.from_lookup unable to validate credentials in Cloud9 #5934

Closed
kylevoyto opened this issue Jan 23, 2020 · 8 comments
Closed

ec2.Vpc.from_lookup unable to validate credentials in Cloud9 #5934

kylevoyto opened this issue Jan 23, 2020 · 8 comments
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI
Milestone

Comments

@kylevoyto
Copy link

I get the error AWS was not able to validate the provided access credentials when I run cdk diff in a Cloud9 Environment (Amazon Linux) where my CDK App includes the following function call:

vpc = ec2.Vpc.from_lookup(
    self, 'vpc',
    vpc_id='#vpc-id'
)

My environment contains an ~/.aws/credentials file with temporary credentials. I am able to successfully run commands with the AWS CLI and I'm able to run both cdk diff and cdk deploy on my app when it does not include the ec2.Vpc.from_lookup function call.

I can successfully run cdk diff in my local (macOS) development environment.

Reproduction Steps

  1. Setup an Amazon Linux Cloud9 environment.
  2. Install AWS CDK in the environment.
  3. Create a CDK App with an ec2.Vpc.from_lookup function call.
  4. Run cdk diff.

Error Log

[Error at /stack-id] AWS was not able to validate the provided access credentials
Found errors

Environment

  • CDK CLI Version: cdk --version = 1.21.1 (build 842cc5f)
  • Module Version: pip list | grep ec2 = aws-cdk.aws-ec2 1.21.1
  • OS: cat /etc/system-release = Amazon Linux AMI release 2018.03
  • Language: python --version = Python 3.8.1

Other

I setup my environment with the following line:

env = core.Environment(account='#account-id', region='us-east-2')
StackConstruct(app, 'stack-id', env=env)

This is 🐛 Bug Report

@kylevoyto kylevoyto added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 23, 2020
@SomayaB SomayaB added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Jan 23, 2020
@rix0rrr
Copy link
Contributor

rix0rrr commented Jan 24, 2020

Can you run again with -v and paste the log?

@rix0rrr rix0rrr added package/tools Related to AWS CDK Tools or CLI and removed @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud labels Jan 24, 2020
@rix0rrr rix0rrr added the p1 label Jan 24, 2020
@kylevoyto
Copy link
Author

Verbose Error Log

(my-app) kylev:~/environment/my-app (master) $ cdk diff -v
CDK toolkit version: 1.21.1 (build 842cc5f)
Command line arguments: { _: [ 'diff' ],
  v: true,
  verbose: true,
  'ignore-errors': false,
  ignoreErrors: false,
  json: false,
  j: false,
  ec2creds: undefined,
  i: undefined,
  'version-reporting': undefined,
  versionReporting: undefined,
  'path-metadata': true,
  pathMetadata: true,
  'asset-metadata': true,
  assetMetadata: true,
  'role-arn': undefined,
  r: undefined,
  roleArn: undefined,
  staging: true,
  'no-color': false,
  noColor: false,
  fail: false,
  'context-lines': 3,
  contextLines: 3,
  strict: false,
  '$0': 'cdk' }
Determining whether we're on an EC2 instance.
Looks like EC2 instance.
cdk.json: {
  "app": "python3 app.py"
}
cdk.context.json: {
  "@aws-cdk/core:enableStackNameDuplicates": "true",
  "aws-cdk:enableDiffNoFail": "true"
}
merged settings: { versionReporting: true,
  pathMetadata: true,
  output: 'cdk.out',
  app: 'python3 app.py',
  context: {},
  tags: [],
  assetMetadata: true,
  toolkitBucket: {},
  staging: true }
Setting "CDK_DEFAULT_REGION" environment variable to us-east-2
Resolving default credentials
Retrieved account ID <account-id> from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to <account-id>
context: { '@aws-cdk/core:enableStackNameDuplicates': 'true',
  'aws-cdk:enableDiffNoFail': 'true',
  'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true }
outdir: cdk.out
env: { CDK_DEFAULT_REGION: 'us-east-2',
  CDK_DEFAULT_ACCOUNT: '<account-id>',
  CDK_CONTEXT_JSON:
   '{"@aws-cdk/core:enableStackNameDuplicates":"true","aws-cdk:enableDiffNoFail":"true","aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true}',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '1.16.0',
  CDK_CLI_VERSION: '1.21.1' }
Some context information is missing. Fetching...
Using default AWS SDK credentials for account <account-id>
Listing VPCs in <account-id>:us-east-2
Setting "vpc-provider:account=<account-id>:filter.vpc-id=<vpc-id>:region=us-east-2:returnAsymmetricSubnets=true" context to {"$providerError":"AWS was not able to validate the provided access credentials","$dontSaveContext":true}
Setting "CDK_DEFAULT_REGION" environment variable to us-east-2
Setting "CDK_DEFAULT_ACCOUNT" environment variable to <account-id>
context: { '@aws-cdk/core:enableStackNameDuplicates': 'true',
  'aws-cdk:enableDiffNoFail': 'true',
  'vpc-provider:account=<account-id>:filter.vpc-id=<vpc-id>:region=us-east-2:returnAsymmetricSubnets=true':
   { '$providerError':
      'AWS was not able to validate the provided access credentials',
     '$dontSaveContext': true },
  'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true }
outdir: cdk.out
env: { CDK_DEFAULT_REGION: 'us-east-2',
  CDK_DEFAULT_ACCOUNT: '<account-id>',
  CDK_CONTEXT_JSON:
   '{"@aws-cdk/core:enableStackNameDuplicates":"true","aws-cdk:enableDiffNoFail":"true","vpc-provider:account=<account-id>:filter.vpc-id=vpc-0d01a54138f97ff2e:region=us-east-2:returnAsymmetricSubnets=true":{"$providerError":"AWS was not able to validate the provided access credentials","$dontSaveContext":true},"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true}',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '1.16.0',
  CDK_CLI_VERSION: '1.21.1' }
Not making progress trying to resolve environmental context. Giving up.
[Error at /my-app-stack] AWS was not able to validate the provided access credentials
  ConstructNode.addError (/tmp/jsii-kernel-YZC2ho/node_modules/@aws-cdk/core/lib/construct.js:285:14)
  Function.getValue (/tmp/jsii-kernel-YZC2ho/node_modules/@aws-cdk/core/lib/context-provider.js:54:28)
  Function.fromLookup (/tmp/jsii-kernel-YZC2ho/node_modules/@aws-cdk/aws-ec2/lib/vpc.js:382:51)
  _wrapSandboxCode (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7611:51)
  Kernel._wrapSandboxCode (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:8222:20)
  ret._ensureSync (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7611:25)
  Kernel._ensureSync (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:8198:20)
  Kernel.sinvoke (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7610:26)
  KernelHost.processRequest (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7296:28)
  KernelHost.run (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7236:14)
  Immediate.setImmediate [as _onImmediate] (/home/ec2-user/miniconda/envs/my-app/lib/python3.8/site-packages/jsii/_embedded/jsii/jsii-runtime.js:7239:37)
  runCallback (timers.js:705:18)
  tryOnImmediate (timers.js:676:5)
  processImmediate (timers.js:658:5)
Found errors
Error: Found errors
    at AppStacks.processMetadata (/home/ec2-user/.nvm/versions/node/v10.18.1/lib/node_modules/aws-cdk/lib/api/cxapp/stacks.ts:317:13)
    at CdkToolkit.diff (/home/ec2-user/.nvm/versions/node/v10.18.1/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:48:20)
    at process._tickCallback (internal/process/next_tick.js:68:7)

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Mar 4, 2020
@rix0rrr rix0rrr removed their assignment Apr 29, 2020
@shivlaks shivlaks added the effort/medium Medium work item – several days of effort label Aug 7, 2020
@rix0rrr rix0rrr added this to the [CLI] Soon milestone Aug 13, 2020
@NGL321 NGL321 assigned rix0rrr and unassigned shivlaks Jan 25, 2021
@jbremson
Copy link

jbremson commented Apr 27, 2021

I'm having a similar problem from python CDK.

`stack_env = core.Environment(account=core.Aws.ACCOUNT_ID, region=core.Aws.REGION)

InspectorLambdaStack(scope=app,
id='...',
description='...',
settings=settings,
env=stack_env)
`

In the stack:

vpc = aws_ec2.Vpc.from_lookup(self, "<vpc_name>", vpc_id='<vpc_id')

CDK toolkit version: 1.90.1 (build 0aee440)
Command line arguments: {
  _: [ 'deploy' ],
  v: 1,
  verbose: 1,
  defaultAccount: 'stg',
  defaultRegion: 'us-west-1',
  lookups: true,
  'ignore-errors': false,
  ignoreErrors: false,
  json: false,
  j: false,
  debug: false,
  ec2creds: undefined,
  i: undefined,
  'version-reporting': undefined,
  versionReporting: undefined,
  'path-metadata': true,
  pathMetadata: true,
  'asset-metadata': true,
  assetMetadata: true,
  'role-arn': undefined,
  r: undefined,
  roleArn: undefined,
  staging: true,
  'no-color': false,
  noColor: false,
  fail: false,
  all: false,
  'build-exclude': [],
  E: [],
  buildExclude: [],
  ci: false,
  execute: true,
  force: false,
  f: false,
  parameters: [ {} ],
  'previous-parameters': true,
  previousParameters: true,
  '$0': '/usr/local/bin/cdk',
  STACKS: [ 'inspector-stack' ],
  'S-t-a-c-k-s': [ 'inspector-stack' ]
}
cdk.json: {
  "app": "python3 ecs-app.py"
}
merged settings: {
  versionReporting: true,
  pathMetadata: true,
  output: 'cdk.out',
  app: 'python3 ecs-app.py',
  context: {},
  debug: false,
  assetMetadata: true,
  toolkitBucket: {},
  staging: true,
  bundlingStacks: [ '*' ],
  lookups: true
}
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-west-1
Resolving default credentials
Looking up default account ID from STS
Default account ID: xxxxxxxxxxxxx
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 123696883349
context: {
  'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true,
  'aws:cdk:version-reporting': true,
  'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
  CDK_DEFAULT_REGION: 'us-west-1',
  CDK_DEFAULT_ACCOUNT: 'xxxxxxxxxxxxxxx',
  CDK_CONTEXT_JSON: '{"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '9.0.0',
  CDK_CLI_VERSION: '1.90.1'
}
Running on account: stg
jsii.errors.JavaScriptError: 
  Error: Cannot retrieve value from context provider vpc-provider since account/region are not specified at the stack level. Either configure "env" with explicit account and region when you define your stack, or use the environment variables "CDK_DEFAULT_ACCOUNT" and "CDK_DEFAULT_REGION" to inherit environment information from the CLI (not recommended for production stacks)
      at Function.getValue (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/jsii-kernel-K9rPPM/node_modules/@aws-cdk/core/lib/context-provider.js:51:19)
      at Function.fromLookup (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/jsii-kernel-K9rPPM/node_modules/@aws-cdk/aws-ec2/lib/vpc.js:483:51)
      at /private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:7991:114
      at Kernel._wrapSandboxCode (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:8582:24)
      at /private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:7991:87
      at Kernel._ensureSync (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:8563:28)
      at Kernel.sinvoke (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:7991:34)
      at KernelHost.processRequest (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:9479:36)
      at KernelHost.run (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:9442:22)
      at Immediate._onImmediate (/private/var/folders/kf/031yw5wx3hnfj7by8xsjz4jc0000gn/T/tmp40zf2ury/lib/program.js:9443:46)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "ecs-app.py", line 63, in <module>
    InspectorLambdaStack(scope=app,
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/jsii/_runtime.py", line 83, in __call__
    inst = super().__call__(*args, **kwargs)
  File "/Users/joel/PycharmProjects/apto-settlements-inspector/cfn/stacks/inspector_stack.py", line 78, in __init__
    vpc = aws_ec2.Vpc.from_lookup(self, "main-stg",
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/aws_cdk/aws_ec2/__init__.py", line 42251, in from_lookup
    return typing.cast(IVpc, jsii.sinvoke(cls, "fromLookup", [scope, id, options]))
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/jsii/_kernel/__init__.py", line 128, in wrapped
    return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/jsii/_kernel/__init__.py", line 359, in sinvoke
    response = self.provider.sinvoke(
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/jsii/_kernel/providers/process.py", line 362, in sinvoke
    return self._process.send(request, InvokeResponse)
  File "/Users/joel/PycharmProjects/venvs/inspector/lib/python3.8/site-packages/jsii/_kernel/providers/process.py", line 326, in send
    raise JSIIError(resp.error) from JavaScriptError(resp.stack)
jsii.errors.JSIIError: Cannot retrieve value from context provider vpc-provider since account/region are not specified at the stack level. Either configure "env" with explicit account and region when you define your stack, or use the environment variables "CDK_DEFAULT_ACCOUNT" and "CDK_DEFAULT_REGION" to inherit environment information from the CLI (not recommended for production stacks)
Subprocess exited with error 1
Error: Subprocess exited with error 1
    at ChildProcess.<anonymous> (/usr/local/Cellar/aws-cdk/1.90.1/libexec/lib/node_modules/aws-cdk/lib/api/cxapp/exec.ts:122:23)
    at ChildProcess.emit (node:events:378:20)
    at ChildProcess.EventEmitter.emit (node:domain:470:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

@gliptak
Copy link

gliptak commented Jul 9, 2021

I also see something similar with synth. Following https://docs.aws.amazon.com/cdk/latest/guide/environments.html I used:

const app = new cdk.App();
new CdkTs1Stack(app, 'CdkTs1Stack', {
  env: { 
    account: process.env.CDK_DEPLOY_ACCOUNT || process.env.CDK_DEFAULT_ACCOUNT, 
    region: process.env.CDK_DEPLOY_REGION || process.env.CDK_DEFAULT_REGION 
  }
});

Running cdk --profile myprofile --verbose synth shows (values seem to be set for CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION)

Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Resolving default credentials
Looking up default account ID from STS
Default account ID: 123456789
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 123456789
context: {
  '@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
  '@aws-cdk/core:enableStackNameDuplicates': 'true',
  'aws-cdk:enableDiffNoFail': 'true',
  '@aws-cdk/core:stackRelativeExports': 'true',
  '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true,
  '@aws-cdk/aws-secretsmanager:parseOwnedSecretName': true,
  '@aws-cdk/aws-kms:defaultKeyPolicies': true,
  '@aws-cdk/aws-s3:grantWriteWithoutAcl': true,
  '@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount': true,
  '@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
  '@aws-cdk/aws-efs:defaultEncryptionAtRest': true,
  '@aws-cdk/aws-lambda:recognizeVersionProps': true,
  'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true,
  'aws:cdk:version-reporting': true,
  'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
  CDK_DEFAULT_REGION: 'us-east-1',
  CDK_DEFAULT_ACCOUNT: '123456789',
  CDK_CONTEXT_JSON: '{"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:enableStackNameDuplicates":"true","aws-cdk:enableDiffNoFail":"true","@aws-cdk/core:stackRelativeExports":"true","@aws-cdk/aws-ecr-assets:dockerIgnoreSupport":true,"@aws-cdk/aws-secretsmanager:parseOwnedSecretName":true,"@aws-cdk/aws-kms:defaultKeyPolicies":true,"@aws-cdk/aws-s3:grantWriteWithoutAcl":true,"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-efs:defaultEncryptionAtRest":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '11.0.0',
  CDK_CLI_VERSION: '1.106.1'
}
Some context information is missing. Fetching...
Listing VPCs in 123456789:us-east-1
Call failed: describeVpcs({"Filters":[]}) => The filter 'null' is invalid (code=InvalidParameterValue)
Setting "vpc-provider:account=123456789:region=us-east-1:returnAsymmetricSubnets=true" context to {"$providerError":"The filter 'null' is invalid","$dontSaveContext":true}
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 123456789
context: {
  'vpc-provider:account=123456789:region=us-east-1:returnAsymmetricSubnets=true': {
    '$providerError': "The filter 'null' is invalid",
    '$dontSaveContext': true
  },
  '@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
  '@aws-cdk/core:enableStackNameDuplicates': 'true',
  'aws-cdk:enableDiffNoFail': 'true',
  '@aws-cdk/core:stackRelativeExports': 'true',
  '@aws-cdk/aws-ecr-assets:dockerIgnoreSupport': true,
  '@aws-cdk/aws-secretsmanager:parseOwnedSecretName': true,
  '@aws-cdk/aws-kms:defaultKeyPolicies': true,
  '@aws-cdk/aws-s3:grantWriteWithoutAcl': true,
  '@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount': true,
  '@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
  '@aws-cdk/aws-efs:defaultEncryptionAtRest': true,
  '@aws-cdk/aws-lambda:recognizeVersionProps': true,
  'aws:cdk:enable-path-metadata': true,
  'aws:cdk:enable-asset-metadata': true,
  'aws:cdk:version-reporting': true,
  'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
  CDK_DEFAULT_REGION: 'us-east-1',
  CDK_DEFAULT_ACCOUNT: '123456789',
  CDK_CONTEXT_JSON: `{"vpc-provider:account=123456789:region=us-east-1:returnAsymmetricSubnets=true":{"$providerError":"The filter 'null' is invalid","$dontSaveContext":true},"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:enableStackNameDuplicates":"true","aws-cdk:enableDiffNoFail":"true","@aws-cdk/core:stackRelativeExports":"true","@aws-cdk/aws-ecr-assets:dockerIgnoreSupport":true,"@aws-cdk/aws-secretsmanager:parseOwnedSecretName":true,"@aws-cdk/aws-kms:defaultKeyPolicies":true,"@aws-cdk/aws-s3:grantWriteWithoutAcl":true,"@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-efs:defaultEncryptionAtRest":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}`,
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '11.0.0',
  CDK_CLI_VERSION: '1.106.1'
}
Not making progress trying to resolve environmental context. Giving up.
[Error at /CdkTs1Stack] The filter 'null' is invalid
  Annotations.addMessage (/app/cdk-ts1/node_modules/@aws-cdk/core/lib/annotations.ts:92:25)
  Annotations.addError (/app/cdk-ts1/node_modules/@aws-cdk/core/lib/annotations.ts:51:10)
  Function.getValue (/app/cdk-ts1/node_modules/@aws-cdk/core/lib/context-provider.ts:106:31)
  Function.fromLookup (/app/cdk-ts1/node_modules/@aws-cdk/aws-ec2/lib/vpc.ts:1077:66)
  new CdkTs1Stack (/app/cdk-ts1/lib/cdk-ts1-stack.ts:9:25)
  Object.<anonymous> (/app/cdk-ts1/bin/cdk-ts1.ts:7:1)
  Module._compile (internal/modules/cjs/loader.js:1063:30)
  Module.m._compile (/app/cdk-ts1/node_modules/ts-node/src/index.ts:1056:23)
  Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
  Object.require.extensions.<computed> [as .ts] (/app/cdk-ts1/node_modules/ts-node/src/index.ts:1059:12)
  Module.load (internal/modules/cjs/loader.js:928:32)
  Function.Module._load (internal/modules/cjs/loader.js:769:14)
  Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
  main (/app/cdk-ts1/node_modules/ts-node/src/bin.ts:198:14)
  Object.<anonymous> (/app/cdk-ts1/node_modules/ts-node/src/bin.ts:288:3)
  Module._compile (internal/modules/cjs/loader.js:1063:30)
  Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
  Module.load (internal/modules/cjs/loader.js:928:32)
  Function.Module._load (internal/modules/cjs/loader.js:769:14)
  Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
  /usr/lib/node_modules/npm/node_modules/libnpx/index.js:268:14
Found errors
Error: Found errors
    at StackCollection.processMetadataMessages (/usr/lib/node_modules/aws-cdk/lib/api/cxapp/cloud-assembly.ts:227:13)
    at CdkToolkit.validateStacks (/usr/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:427:12)
    at CdkToolkit.selectStacksForDiff (/usr/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:406:16)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at CdkToolkit.synth (/usr/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:300:20)
    at initCommandLine (/usr/lib/node_modules/aws-cdk/bin/cdk.ts:209:9)

@gliptak
Copy link

gliptak commented Jul 9, 2021

Other possibly related issues #5852 #14405 #9477 #7701 #3130 #3082

@github-actions
Copy link

github-actions bot commented Jul 9, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 9, 2022
@jjmonsalveg
Copy link

@kylevoyto were you able to solve this issue? I'm facing the same problem

@kylevoyto
Copy link
Author

@jjmonsalveg no, I think I moved out of Cloud9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

7 participants