Skip to content

(aws-cloudfront-s3) AWS::CloudFront::OriginAccessControl not support in China Region #1050

@YikaiHu

Description

@YikaiHu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageThe issue or PR still needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions