AWS CDK tutorial generates a broken template?

I’m working through the AWS Cloud Development Kit (CDK) tutorial at https://docs.aws.amazon.com/cdk/v2/guide/hello_world.html. Working in CloudShell, I got through step 7 with no trouble; step 6 produced the following template.

Resources:
  HelloWorldFunctionServiceRole8E0BD458:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action: sts:AssumeRole
            Effect: Allow
            Principal:
              Service: lambda.amazonaws.com
        Version: "2012-10-17"
      ManagedPolicyArns:
        - Fn::Join:
            - ""
            - - "arn:"
              - Ref: AWS::Partition
              - :iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
    Metadata:
      aws:cdk:path: HelloCdkStack/HelloWorldFunction/ServiceRole/Resource
  HelloWorldFunctionB2AB6E79:
    Type: AWS::Lambda::Function
    Properties:
      Code:
        ZipFile: "

                  exports.handler = async function(event) {

                    return {

                      statusCode: 200,

                      body: JSON.stringify('Hello World!'),

                    };

                  };

                "
      Handler: index.handler
      Role:
        Fn::GetAtt:
          - HelloWorldFunctionServiceRole8E0BD458
          - Arn
      Runtime: nodejs20.x
    DependsOn:
      - HelloWorldFunctionServiceRole8E0BD458
    Metadata:
      aws:cdk:path: HelloCdkStack/HelloWorldFunction/Resource
  HelloWorldFunctionFunctionUrl4150BDAD:
    Type: AWS::Lambda::Url
    Properties:
      AuthType: NONE
      TargetFunctionArn:
        Fn::GetAtt:
          - HelloWorldFunctionB2AB6E79
          - Arn
    Metadata:
      aws:cdk:path: HelloCdkStack/HelloWorldFunction/FunctionUrl/Resource
  HelloWorldFunctioninvokefunctionurlA2CB1A84:
    Type: AWS::Lambda::Permission
    Properties:
      Action: lambda:InvokeFunctionUrl
      FunctionName:
        Fn::GetAtt:
          - HelloWorldFunctionB2AB6E79
          - Arn
      FunctionUrlAuthType: NONE
      Principal: "*"
    Metadata:
      aws:cdk:path: HelloCdkStack/HelloWorldFunction/invoke-function-url
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Analytics: v2:deflate64:H4sIAAAAAAAA/02MyQrCMBRFv6X75NkWEfcFt0rFtaRJhNdmkAy6CPl3mzjg6lzOgdtDt91B27Cnp1wsVOEE6RwYX8iqrkkxPQkG6RAND2gNGW7mt7/j4lTxH5yk0+j96jNBpiGNVskSCnMmo/Q2Ol7VMYZ7DDX+2cEagaEeGCskzH7z6PbQt9A3s0ekLpqAWsL45gvvKoubxQAAAA==
    Metadata:
      aws:cdk:path: HelloCdkStack/CDKMetadata/Default
    Condition: CDKMetadataAvailable
Outputs:
  myFunctionUrlOutput:
    Value:
      Fn::GetAtt:
        - HelloWorldFunctionFunctionUrl4150BDAD
        - FunctionUrl
Conditions:
  CDKMetadataAvailable:
    Fn::Or:
      - Fn::Or:
          - Fn::Equals:
              - Ref: AWS::Region
              - af-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-east-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-northeast-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-northeast-2
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-southeast-1
          - Fn::Equals:
              - Ref: AWS::Region
              - ap-southeast-2
          - Fn::Equals:
              - Ref: AWS::Region
              - ca-central-1
          - Fn::Equals:
              - Ref: AWS::Region
              - cn-north-1
          - Fn::Equals:
              - Ref: AWS::Region
              - cn-northwest-1
      - Fn::Or:
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-central-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-north-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-1
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-2
          - Fn::Equals:
              - Ref: AWS::Region
              - eu-west-3
          - Fn::Equals:
              - Ref: AWS::Region
              - il-central-1
          - Fn::Equals:
              - Ref: AWS::Region
              - me-central-1
          - Fn::Equals:
              - Ref: AWS::Region
              - me-south-1
          - Fn::Equals:
              - Ref: AWS::Region
              - sa-east-1
      - Fn::Or:
          - Fn::Equals:
              - Ref: AWS::Region
              - us-east-1
          - Fn::Equals:
              - Ref: AWS::Region
              - us-east-2
          - Fn::Equals:
              - Ref: AWS::Region
              - us-west-1
          - Fn::Equals:
              - Ref: AWS::Region
              - us-west-2
Parameters:
  BootstrapVersion:
    Type: AWS::SSM::Parameter::Value<String>
    Default: /cdk-bootstrap/hnb659fds/version
    Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]
Rules:
  CheckBootstrapVersion:
    Assertions:
      - Assert:
          Fn::Not:
            - Fn::Contains:
                - - "1"
                  - "2"
                  - "3"
                  - "4"
                  - "5"
                - Ref: BootstrapVersion
        AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.

But when I run step 8, executing cdk deploy, I get the following response:

 ❌  HelloCdkStack failed: Error [ValidationError]: Template format error: Unrecognized resource types: [AWS::Lambda::Url]
    at Request.extractError (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:46723)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91777)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91225)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:199828)
    at Request.transition (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:193380)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:158252)
    at /usr/local/lib/node_modules/aws-cdk/lib/index.js:401:158582
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:193672)
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:199903)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91945) {
  code: 'ValidationError',
  time: 2024-08-12T18:34:33.761Z,
  requestId: '0cc0f0d3-9940-495b-bf2a-f4578ef910f0',
  statusCode: 400,
  retryable: false,
  retryDelay: 261.7239740021147
}

 ❌ Deployment failed: Error [ValidationError]: Template format error: Unrecognized resource types: [AWS::Lambda::Url]
    at Request.extractError (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:46723)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91777)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91225)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:199828)
    at Request.transition (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:193380)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:158252)
    at /usr/local/lib/node_modules/aws-cdk/lib/index.js:401:158582
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:193672)
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:199903)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/lib/index.js:401:91945) {
  code: 'ValidationError',
  time: 2024-08-12T18:34:33.761Z,
  requestId: '0cc0f0d3-9940-495b-bf2a-f4578ef910f0',
  statusCode: 400,
  retryable: false,
  retryDelay: 261.7239740021147

So, CDK doesn’t recognize the AWS::Lambda::Url resource type that CDK itself included in the template that it generated? I’m getting no clue from the error message as to what to do about this.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật