HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
cloudtools
troposphere
Python2014–2026
cloudtools / troposphere

troposphere

troposphere - Python library to create AWS CloudFormation descriptions

24Distinct people
27Mentions
0Explicit recommenders
4.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

troposphere - Python library to create AWS CloudFormation descriptions

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 8:59:20 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year27 dated mentions

Observed mentions: 2014-07-28 19:37:23 UTC to 2026-01-18 01:27:01 UTC.

02462014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC606
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC514
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC312
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
troposphere About troposphere - library to create AWS CloudFormation descriptions The troposphere library allows for easier creation of the AWS CloudFormation JSON by writing Python code to describe the AWS resources. troposphere also includes some basic support for OpenStack resources via Heat. To facilitate catching CloudFormation or JSON errors early the library has property and type checking built into the classes. Installation troposphere can be installed using the pip distribution system for Python by issuing: $ pip install troposphere To install troposphere with awacs (recommended soft dependency): $ pip install troposphere[policy] Alternatively, you can use setup.py to install by cloning this repository and issuing: $ python setup.py install # you may need sudo depending on your python installation Examples A simple example to create an instance would look like this: >>> from troposphere import Ref, Template >>> import troposphere.ec2 as ec2 >>> t = Template() >>> instance = ec2.Instance("myinstance") >>> instance.ImageId = "ami-951945d0" >>> instance.InstanceType = "t1.micro" >>> t.add_resource(instance) <troposphere.ec2.Instance object at 0x101bf3390> >>> print(t.to_json()) { "Resources": { "myinstance": { "Properties": { "ImageId": "ami-951945d0", "InstanceType": "t1.micro" }, "Type": "AWS::EC2::Instance" } } } >>> print(t.to_yaml()) Resources: myinstance: Properties: ImageId: ami-951945d0 InstanceType: t1.micro Type: AWS::EC2::Instance Alternatively, parameters can be used instead of properties: >>> instance = ec2.Instance("myinstance", ImageId="ami-951945d0", InstanceType="t1.micro") >>> t.add_resource(instance) <troposphere.ec2.Instance object at 0x101bf3550> And add_resource() returns the object to make it easy to use with Ref(): >>> instance = t.add_resource(ec2.Instance("myinstance", ImageId="ami-951945d0", InstanceType="t1.micro")) >>> Ref(instance) <troposphere.Ref object at 0x101bf3490> Examples of the error checking (full tracebacks removed for clarity): Incorrect property being set on AWS resource: >>> import troposphere.ec2 as ec2 >>> ec2.Instance("ec2instance", image="i-XXXX") Traceback (most recent call last): ... AttributeError: AWS::EC2::Instance object does not support attribute image Incorrect type for AWS resource property: >>> ec2.Instance("ec2instance", ImageId=1) Traceback (most recent call last): ... TypeError: ImageId is <type 'int'>, expected <type 'basestring'> Missing required property for the AWS resource: >>> from troposphere import Template >>> import troposphere.ec2 as ec2 >>> t = Template() >>> t.add_resource(ec2.Subnet("ec2subnet", VpcId="vpcid")) <troposphere.ec2.Subnet object at 0x100830ed0> >>> print(t.to_json()) Traceback (most recent call last): ... ValueError: Resource CidrBlock required in type AWS::EC2::Subnet (title: ec2subnet) Currently supported resource types AWS Resource Types OpenStack Resource Types Duplicating a single instance sample would look like this # Converted from EC2InstanceSample.template located at: # http://aws.amazon.com/cloudformation/aws-cloudformation-templates/ from troposphere import Base64, FindInMap, GetAtt from troposphere import Parameter, Output, Ref, Template import troposphere.ec2 as ec2 template = Template() keyname_param = template.add_parameter(Parameter( "KeyName", Description="Name of an existing EC2 KeyPair to enable SSH " "access to the instance", Type="String", )) template.add_mapping('RegionMap', { "us-east-1": {"AMI": "ami-7f418316"}, "us-west-1": {"AMI": "ami-951945d0"}, "us-west-2": {"AMI": "ami-16fd7026"}, "eu-west-1": {"AMI": "ami-24506250"}, "sa-east-1": {"AMI": "ami-3e3be423"}, "ap-southeast-1": {"AMI": "ami-74dda626"}, "ap-northeast-1": {"AMI": "ami-dcfa4edd"} }) ec2_instance = template.add_resource(ec2.Instance( "Ec2Instance", ImageId=FindInMap("RegionMap", Ref("AWS::Region"), "AMI"), InstanceType="t1.micro", KeyName=Ref(keyname_param), SecurityGroups=["default"], UserData=Base64("80") )) template.add_output([ Output( "InstanceId", Description="InstanceId of the newly created EC2 instance", Value=Ref(ec2_instance), ), Output( "AZ", Description="Availability Zone of the newly created EC2 instance", Value=GetAtt(ec2_instance, "AvailabilityZone"), ), Output( "PublicIP", Description="Public IP address of the newly created EC2 instance", Value=GetAtt(ec2_instance, "PublicIp"), ), Output( "PrivateIP", Description="Private IP address of the newly created EC2 instance", Value=GetAtt(ec2_instance, "PrivateIp"), ), Output( "PublicDNS", Description="Public DNSName of the newly created EC2 instance", Value=GetAtt(ec2_instance, "PublicDnsName"), ), Output( "PrivateDNS", Description="Private DNSName of the newly created EC2 instance", Value=GetAtt(ec2_instance, "PrivateDnsName"), ), ]) print(template.to_json()) Community We have a Google Group, cloudtools-dev, where you can ask questions and engage with the troposphere community. Issues and pull requests are always welcome! Licensing troposphere is licensed under the BSD 2-Clause license. See LICENSE for the troposphere full license text.
Read the full README on GitHub

What Hacker News says

1 sources
At lot of the debate here centers on DSLs vs programming languages and I don't want to get into the weeds of that. I did use terraform extensively at a few places and generally if you want to do something simple it does a fine job. When things start getting complex and the team & infrastructure is larger...well, let's just say some warts start coming up. You more or less end up with some type of a wrapper around it. But in another place we decided to use troposphere[0] and I liked it more (at least for AWS-only shops). A lot more flexibility and you're relying on Cloudformation to do some of the heavy lifting around states. We basically ended up with a tool based on that library which would generate deployable CF stacks (and some other things). [0] https://github.com/cloudtools/troposphere
In Terraform 0.9

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.