AWS CloudFormation
User Guide (Version )

AWS::Route53::RecordSetGroup

A complex type that contains an optional comment, the name and ID of the hosted zone that you want to make changes in, and values for the resource record sets that you want to add, update, or delete.

Syntax

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

JSON

{ "Type" : "AWS::Route53::RecordSetGroup", "Properties" : { "Comment" : String, "HostedZoneId" : String, "HostedZoneName" : String, "RecordSets" : [ RecordSet, ... ] } }

YAML

Type: AWS::Route53::RecordSetGroup Properties: Comment: String HostedZoneId: String HostedZoneName: String RecordSets: - RecordSet

Properties

Comment

Optional: Any comments you want to include about a change batch request.

Required: No

Type: String

Maximum: 256

Update requires: No interruption

HostedZoneId

The ID of the hosted zone that contains the resource record sets that you want to change.

Required: No

Type: String

Maximum: 32

Update requires: Replacement

HostedZoneName

The name of the hosted zone that you want to create, update, or delete resource record sets in.

Required: No

Type: String

Maximum: 1024

Update requires: Replacement

RecordSets

A complex type that contains one RecordSet element for each resource record set that you want to add, update, or delete.

Required: No

Type: List of RecordSet

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the record set group, for example, MyRecordSetGroup.

For more information about using the Ref function, see Ref.

Examples

Mapping a Route 53 A record to the public IP of an Amazon EC2 instance

JSON

"Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ] } } }, "myDNSRecord" : { "Type" : "AWS::Route53::RecordSet", "Properties" : { "HostedZoneName" : { "Ref" : "HostedZoneResource" }, "Comment" : "DNS name for my instance.", "Name" : { "Fn::Join" : [ "", [ {"Ref" : "Ec2Instance"}, ".", {"Ref" : "AWS::Region"}, ".", {"Ref" : "HostedZone"} ,"." ] ] }, "Type" : "A", "TTL" : "900", "ResourceRecords" : [ { "Fn::GetAtt" : [ "Ec2Instance", "PublicIp" ] } ] } } }

YAML

Resources: Ec2Instance: Type: AWS::EC2::Instance Properties: ImageId: !FindInMap [RegionMap, !Ref 'AWS::Region', AMI] myDNSRecord: Type: AWS::Route53::RecordSet Properties: HostedZoneName: !Ref 'HostedZoneResource' Comment: DNS name for my instance. Name: !Join ['', [!Ref 'Ec2Instance', ., !Ref 'AWS::Region', ., !Ref 'HostedZone', .]] Type: A TTL: '900' ResourceRecords: - !GetAtt Ec2Instance.PublicIp

See Also