Skip to content

AWS::Serverless::HttpApi fails when setting DisableExecuteApiEndpoint to True #1788

@pankajagrawal16

Description

@pankajagrawal16

Description:

When setting DisableExecuteApiEndpoint to True for disabling default endpoint on AWS::Serverless::HttpApi, stack fails with an error.
Sample template

SampleHttpApi:
    Type: AWS::Serverless::HttpApi
    Properties:
      Auth:
        Authorizers:
          GeneralAuth:
            AuthorizationScopes:
              - email
            IdentitySource: "$request.header.Authorization"
            JwtConfiguration:
              issuer: !Sub https://cognito-idp.${AWS::Region}.amazonaws.com/${UserPoolId}
              audience:
                - !Ref Audience
          CustomLambdaAuthorizer:
            AuthorizerPayloadFormatVersion: 2.0
            EnableSimpleResponses: True
            FunctionInvokeRole: !GetAtt LambdaAuthInvokeRole.Arn
            FunctionArn: !GetAtt CustomLambdaAuth.Arn
            Identity:
              Headers:
                - Authorization
              ReauthorizeEvery: 5
      CorsConfiguration:
        AllowMethods:
          - GET
        AllowOrigins:
          - http://localhost:8080
      Domain:
        CertificateArn: !Ref CustomDomainCert
        DomainName: !Ref DomainName
        EndpointConfiguration: REGIONAL
        SecurityPolicy: TLS_1_2
        Route53:
          EvaluateTargetHealth: False
          HostedZoneId: !Ref HostedZoneId
       DisableExecuteApiEndpoint: True

Steps to reproduce the issue:

  1. Create a HTTP API via SAM
  2. Attempt to disable default endpoint via DisableExecuteApiEndpoint to True

Observed result:

image

Expected result:
Should execute successfully and disable default endpoint.

Note Support was released as part of #1725. Ref issue #1750

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions