Skip to content

Add support for EndpointConfiguration.IpAddressType for REST APIs and Custom Domains #3799

@txase

Description

@txase

Description

I want to deploy a dual-stack (IPv4 / IPv6) API Gateway REST API and Custom Domain. This requires setting the AWS::ApiGateway::RestApi resource's EndpointConfiguration.IpAddressType and Domain.EndpointConfiguration.IpAddressType properties to 'dualstack'. However, the SAM transform is silently ignoring these options when provided in AWS::Serverless::Api

Steps to reproduce

Create an API with the following configuration:

Resources:
  Api:
    Type: AWS::Serverless::Api
    Properties:
      Name: my-api
      StageName: Prod
      DefinitionBody:
        openapi: 3.0.1
        info:
          title: my-api
          version: 1
        paths:
          /{proxy+}:
            x-amazon-apigateway-any-method:
              x-amazon-apigateway-integration:
                httpMethod: POST
                type: aws_proxy
                uri: !Sub arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${APIFunc.Arn}/invocations
              responses: {}
      Domain:
        DomainName: !Sub mydomain.example.com
        CertificateArn: !Ref ApiCertificate
        EndpointConfiguration:
          IpAddressType: dualstack
          Types:
            - REGIONAL
        Route53:
          HostedZoneId: !Ref HostedZoneId
      EndpointConfiguration:
        Type: REGIONAL
        IpAddressType: dualstack

Observed result

A Regional REST API and Custom Domain are created with only IPv4 support. Looking at the processed template, the IpAddressType properties is silently dropped during transformation.

Expected result

Regional, dual-stack REST API and Custom Domains are created.

Additional environment details

  1. OS: N/A
  2. If using the SAM CLI, sam --version: Not using SAM CLI
  3. AWS region: us-west-2

Metadata

Metadata

Assignees

No one assigned

    Labels

    stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions