how to specify TLS version in cloudformation template for REST API?

Viewed 110

Creating a stack, REST API - with API gateway and other resources. where can I specify if the API methods support just HTTP or HTTPS, or any specific version of TLS in the template?

AWSTemplateFormatVersion: 2010-09-09
Description: API Gateway

Parameters:
  apiGatewayHTTPMethod:
    Type: String
    Default: POST

Resources:
  apiGateway:
    Type: AWS::ApiGateway::RestApi
    Properties:
      EndpointConfiguration:
        Types:
          - REGIONAL
      Name: fooAPI
  apiGatewayRootMethod:
    Type: AWS::ApiGateway::Method
    Properties:
      AuthorizationType: NONE
      HttpMethod: !Ref apiGatewayHTTPMethod
      Integration:
        IntegrationHttpMethod: POST
        Type: AWS_PROXY
        Uri: !Sub
          - arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${lambdaArn}/invocations
          - lambdaArn: !GetAtt lambdaFunction.Arn
      ResourceId: !GetAtt apiGateway.RootResourceId
      RestApiId: !Ref apiGateway

  apiGatewayDeployment:
    Type: AWS::ApiGateway::Deployment
    DependsOn:
      - apiGatewayRootMethod
    Properties:
      RestApiId: !Ref apiGateway
      StageName: BETA
1 Answers

You can't do this. REST API is only HTTPS, and you can't change it to HTTP.

Related