<s> from troposphere import FindInMap , GetAtt , Join , Output <EOL> from troposphere import Parameter , Ref , Template <EOL> from troposphere . ec2 import Instance <EOL> from troposphere . route53 import RecordSetType <EOL> t = Template ( ) <EOL> t . add_description ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> hostedzone = t . add_parameter ( Parameter ( <EOL> "<STR_LIT>" , <EOL> Description = "<STR_LIT>" , <EOL> Type = "<STR_LIT>" , <EOL> ) ) <EOL> t . add_mapping ( '<STR_LIT>' , { <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } , <EOL> "<STR_LIT>" : { "<STR_LIT>" : "<STR_LIT>" } <EOL> } ) <EOL> instance = t . add_resource ( Instance ( <EOL> "<STR_LIT>" , <EOL> ImageId = FindInMap ( "<STR_LIT>" , Ref ( "<STR_LIT>" ) , "<STR_LIT>" ) , <EOL> InstanceType = "<STR_LIT>" , <EOL> ) ) <EOL> myDNSRecord = t . add_resource ( RecordSetType ( <EOL> "<STR_LIT>" , <EOL> HostedZoneName = Join ( "<STR_LIT>" , [ Ref ( hostedzone ) , "<STR_LIT:.>" ] ) , <EOL> Comment = "<STR_LIT>" , <EOL> Name = Join ( "<STR_LIT>" , [ Ref ( instance ) , "<STR_LIT:.>" , Ref ( "<STR_LIT>" ) , "<STR_LIT:.>" , <EOL> Ref ( hostedzone ) , "<STR_LIT:.>" ] ) , <EOL> Type = "<STR_LIT:A>" , <EOL> TTL = "<STR_LIT>" , <EOL> ResourceRecords = [ GetAtt ( "<STR_LIT>" , "<STR_LIT>" ) ] , <EOL> ) ) <EOL> t . add_output ( Output ( "<STR_LIT>" , Value = Ref ( myDNSRecord ) ) ) <EOL> print ( t . to_json ( ) ) </s>
