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

aws-cloudfront-s3 #318

Closed
James96315 opened this issue Aug 9, 2021 · 0 comments · Fixed by #320
Closed

aws-cloudfront-s3 #318

James96315 opened this issue Aug 9, 2021 · 0 comments · Fixed by #320
Assignees
Labels
bug Something isn't working

Comments

@James96315
Copy link

description of the bug:
Failed to create CloudFrontToS3 object using “existingBucketInterface” property

Reproduction Steps

a reference code:

  const portalBucket = Bucket.fromBucketName(this, 'BucketByName', 'BucketName']);
  const portalSite = new CloudFrontToS3(this, 'Portal', {
        existingBucketInterface:portalBucket,
        insertHttpSecurityHeaders: false,
        cloudFrontDistributionProps: {
            errorResponses: [
                {
                    ttl: cdk.Duration.seconds(10),
                    httpStatus: 403,
                    responseHttpStatus: 403,
                    responsePagePath: '/error/403.html'
                }
            ],
            priceClass: cloudfront.PriceClass.PRICE_CLASS_ALL
        }
    });

Error Log

what is the error message you are seeing?
node_modules/@aws-solutions-constructs/core/lib/utils.ts:144
if (resource.cfnOptions.metadata?.cfn_nag?.rules_to_suppress) {
^
TypeError: Cannot read property 'cfnOptions' of undefined
at Object.addCfnSuppressRules (node_modules/@aws-solutions-constructs/core/lib/utils.ts:144:16)
at Object.CloudFrontDistributionForS3 (node_modules/@aws-solutions-constructs/core/lib/cloudfront-distribution-helper.ts:195:3)
at new CloudFrontToS3 (node_modules/@aws-solutions-constructs/aws-cloudfront-s3/lib/index.ts:54:20)

Environment

  • **AWS Solutions Constructs Version :1.114.0
  • **Language :Typescript

This is 🐛 Bug Report

@James96315 James96315 added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Aug 9, 2021
@hnishar hnishar self-assigned this Aug 10, 2021
@hnishar hnishar removed the needs-triage The issue or PR still needs to be triaged label Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants