Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

tmarcinkowski-logitech/demo-aws-solutions-constructs-issue-367

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Issue 367

Steps to reproduce issue 367 after cloning the repository:

  1. cd cdk
  2. npm ci
  3. npx cdk synth

Result

$ npx cdk synth
Cannot read property 'metadata' of undefined
Subprocess exited with error 1

Extra debugging

$ ts-node bin/cdk.ts

/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/node_modules/@aws-solutions-constructs/core/lib/utils.ts:144
  if (resource.cfnOptions.metadata?.cfn_nag?.rules_to_suppress) {
                          ^
TypeError: Cannot read property 'metadata' of undefined
    at Object.addCfnSuppressRules (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/node_modules/@aws-solutions-constructs/core/lib/utils.ts:144:27)
    at updateSecurityPolicy (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/node_modules/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts:31:3)
    at Object.CloudFrontDistributionForS3 (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/node_modules/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts:99:3)
    at new CloudFrontToS3 (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/node_modules/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts:55:20)
    at new Issue367Stack (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/bin/cdk.ts:11:9)
    at Object.<anonymous> (/Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk/bin/cdk.ts:16:1)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Module.m._compile (/Users/tmarcinkowski/.nvm/versions/node/v14.17.0/lib/node_modules/ts-node/src/index.ts:1225:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/tmarcinkowski/.nvm/versions/node/v14.17.0/lib/node_modules/ts-node/src/index.ts:1228:12)
$ npx cdk --version
1.120.0 (build 6c15150)
$ npm ls @aws-cdk/core aws-cdk @aws-cdk/assert @aws-solutions-constructs/aws-cloudfront-s3
[email protected] /Users/tmarcinkowski/work_personal/demo-aws-solutions-constructs-issue-367/cdk
├─┬ @aws-cdk/[email protected] 
│ └── @aws-cdk/[email protected] 
├── @aws-cdk/[email protected] 
├─┬ @aws-solutions-constructs/[email protected] 
│ ├─┬ @aws-cdk/[email protected]
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ ├── @aws-cdk/[email protected] 
│ │ │ └─┬ @aws-cdk/[email protected]
│ │ │   ├─┬ @aws-cdk/[email protected]
│ │ │   │ └── @aws-cdk/[email protected] 
│ │ │   └── @aws-cdk/[email protected] 
│ │ └── @aws-cdk/[email protected] 
│ ├─┬ @aws-cdk/[email protected]
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ └── @aws-cdk/[email protected] 
│ ├─┬ @aws-cdk/[email protected]
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ └── @aws-cdk/[email protected] 
│ ├─┬ @aws-cdk/[email protected]
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ ├─┬ @aws-cdk/[email protected]
│ │ │ │ └── @aws-cdk/[email protected] 
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ ├─┬ @aws-cdk/[email protected]
│ │ │ │ └── @aws-cdk/[email protected] 
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ ├─┬ @aws-cdk/[email protected]
│ │ │ └── @aws-cdk/[email protected] 
│ │ └── @aws-cdk/[email protected] 
│ ├─┬ @aws-cdk/[email protected]
│ │ └── @aws-cdk/[email protected] 
│ ├── @aws-cdk/[email protected] 
│ └─┬ @aws-solutions-constructs/[email protected]
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ ├─┬ @aws-cdk/[email protected]
│   │ │ └── @aws-cdk/[email protected] 
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ ├─┬ @aws-cdk/[email protected]
│   │ │ └── @aws-cdk/[email protected] 
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ ├─┬ @aws-cdk/[email protected]
│   │ │ └── @aws-cdk/[email protected] 
│   │ └── @aws-cdk/[email protected] 
│   ├─┬ @aws-cdk/[email protected]
│   │ └── @aws-cdk/[email protected] 
│   └── @aws-cdk/[email protected] 
└── [email protected] 
$ npx --version
6.14.13
$ ts-node --version
v10.1.0