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) AWS::CloudFront::OriginAccessControl not support in China Region #1050

Open
YikaiHu opened this issue Jan 15, 2024 · 0 comments
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged

Comments

@YikaiHu
Copy link

YikaiHu commented Jan 15, 2024

aws-cloudfront-s3 failed to deploy in China region.

There was an error creating this change set
Template format error: Unrecognized resource types: [AWS::CloudFront::OriginAccessControl]

Reproduction Steps

    const website = new CloudFrontToS3(this, 'Web', {
      bucketProps: {
        versioned: true,
        encryption: s3.BucketEncryption.S3_MANAGED,
        accessControl: s3.BucketAccessControl.PRIVATE,
        enforceSSL: true,
        removalPolicy: RemovalPolicy.RETAIN,
        autoDeleteObjects: false,
      },
      cloudFrontDistributionProps: {
        priceClass: cloudfront.PriceClass.PRICE_CLASS_ALL,
        minimumProtocolVersion: cloudfront.SecurityPolicyProtocol.TLS_V1_2_2019,
        enableIpv6: false,
        enableLogging: true,  //Enable access logging for the distribution.
        comment: `Data Transfer Hub Portal Distribution (${Aws.REGION})`,
        errorResponses: [
          {
            httpStatus: 403,
            responseHttpStatus: 200,
            responsePagePath: "/index.html",
          }
        ],
        defaultBehavior: getDefaultBehavior(),
      },
      insertHttpSecurityHeaders: false,
    });

Error Log

There was an error creating this change set
Template format error: Unrecognized resource types: [AWS::CloudFront::OriginAccessControl]

image

Environment

  • CDK CLI Version : 2.121.1 (build d86bb1a)
  • CDK Framework Version: 2.121.1
  • AWS Solutions Constructs Version : 2.48.0
  • OS : macos
  • Language : typescript

Other

Seems like casued by #1038


This is 🐛 Bug Report

@YikaiHu YikaiHu added bug Something isn't working needs-triage The issue or PR still needs to be triaged labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage The issue or PR still needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant