AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::ElasticLoadBalancingV2::ListenerCertificate

The AWS::ElasticLoadBalancingV2::ListenerCertificate resource adds certificates to an HTTPS listener. For more information, see SSL Certificates in the User Guide for Application Load Balancers.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::ElasticLoadBalancingV2::ListenerCertificate", "Properties" : { "Certificates" : [ Certificate, ... ] "ListenerArn" : String } }

YAML

Type: AWS::ElasticLoadBalancingV2::ListenerCertificate Properties: Certificates: - Certificate ListenerArn: String

Properties

Certificates

The certificates to add. Duplicates not allowed.

Required: Yes

Type: List of Certificate

Update requires: Replacement

ListenerArn

The Amazon Resource Name (ARN) of the listener.

Required: Yes

Type: String

Update requires: Replacement

Example

The following example specifies a listener certificate, containing a single certificate, for a load balancer listener.

JSON

{ "Parameters": { "CertificateArn1": { "Type": "String" }, "CertificateArn2": { "Type": "String" }, "LoadBalancerArn": { "Type": "String" }, "TargetGroupArn": { "Type": "String" } }, "Resources": { "ListenerCertificate": { "Type": "AWS::ElasticLoadBalancingV2::ListenerCertificate", "Properties": { "Certificates": [ { "CertificateArn": { "Ref": "CertificateArn1" } } ], "ListenerArn": { "Ref": "Listener" } } }, "Listener": { "Type": "AWS::ElasticLoadBalancingV2::Listener", "Properties": { "DefaultActions": [ { "Type": "forward", "TargetGroupArn": { "Ref": "TargetGroupArn" } } ], "LoadBalancerArn": { "Ref": "LoadBalancerArn" }, "Port": "8000", "Protocol": "HTTPS", "Certificates": [ { "CertificateArn": { "Ref": "CertificateArn2" } } ] } } } }

YAML

Parameters: CertificateArn1: Type: String CertificateArn2: Type: String LoadBalancerArn: Type: String TargetGroupArn: Type: String Resources: ListenerCertificate: Type: AWS::ElasticLoadBalancingV2::ListenerCertificate Properties: Certificates: - CertificateArn: !Ref CertificateArn1 ListenerArn: !Ref Listener Listener: Type: AWS::ElasticLoadBalancingV2::Listener Properties: DefaultActions: - Type: forward TargetGroupArn: !Ref TargetGroupArn LoadBalancerArn: !Ref LoadBalancerArn Port: '8000' Protocol: HTTPS Certificates: - CertificateArn: !Ref CertificateArn2

On this page: