Questions tagged [troposphere]

A library to create AWS CloudFormation resource descriptions. Useful for automating AWS deployments. Written in Python, available from PyPI.

A library to create AWS CloudFormation resource descriptions. Useful for automating AWS deployments. Written in Python, available from PyPI (https://pypi.python.org/pypi/troposphere/)

65 questions
1
vote
1 answer

Is there any workaround to use if statement in troposphere templates?

I'm trying to add an if statement in add_resource of troposphere, but I can't. Is there any workaround to do so? s3_bucket = t.add_resource(Bucket( "MyBucket", if 2>1: BucketName="bucket1", else: BucketName="bucket2", …
cosmos-1905-14
  • 783
  • 2
  • 12
  • 23
1
vote
2 answers

How to update the SSL negotiation policy in using the Troposhpere framework for an AWS classic load balancer 443 listener

I have a working Troposphere template that brings up my environment with a classic load balancer. I am modifying it to have the load balancer port 443 listener come up using the SSL Negotiation policy(cypher) ELBSecurityPolicy-TLS-1-2-2017-01. It…
ErnieAndBert
  • 1,344
  • 3
  • 21
  • 43
1
vote
1 answer

Associating CloudWatch Alarm with MetricFilter using Troposphere

I'm using a Troposphere script to provision a CloudWatch metric filter and an alarm. In CloudWatch, it's possible to manually create an alarm that goes off based data that is aggregated from logs by the metric filter, but I would like to link the…
1
vote
1 answer

AWS Config and Troposhpere

I'm looking for documentation on how to configure AWS Config utilizing Troposphere. Unfortunately I am having a hard time finding useful documentation for this particular case. I've looked over the Troposphere documentation on GitHub but can't seem…
1
vote
1 answer

How to sort a text file based on column in Python?

I have a file(file.txt) containing the following data: 192.168.10.1/16, 22, 3265, tcp 172.144.32,2/34, 22, 21, udp 10.128.16.234/8, 0, 20, icmp I need to sort this by cloumn[0], cloumn[1] and column[2]
Happy
  • 427
  • 2
  • 4
  • 17
1
vote
2 answers

python package installed but could not import

I have tried to re-install and got the following message: Requirement already satisfied: troposphere==1.8.2 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 13) I checked my python version and I could see this as…
Ani
  • 463
  • 4
  • 20
1
vote
2 answers

Dynamically create n number of ec2 instances with Troposphere

I'm just getting in to EC2, CloudFormation (and Troposphere), etc. I'm trying to start with a simple Selenium Grid to run nightly. Right now, we're using spinning up 12 selenium nodes (each on it's own EC2 instance) when needed. The stacks are only…
Sathed
  • 836
  • 1
  • 11
  • 21
1
vote
1 answer

Unable to set ASG instance hostnames using Troposphere/CloudFormation UserData

Here's the relevant part of my Troposphere file: LaunchConfiguration = t.add_resource(LaunchConfiguration( "LaunchConfigA", ImageId=UBUNTU_IMG, SecurityGroups=[Ref(SecurityGroup)], InstanceType="m3.medium", …
1
vote
1 answer

Using Cloudformation for Codedeploy

I am trying to use troposphere to make a cloudformation template. The stack the template makes intended to be a simple example of codedeploy I have previously got troposphere to generate ec2, s3, iam and route53 generating templates. I have…
Vorsprung
  • 32,923
  • 5
  • 39
  • 63
1
vote
2 answers

Troposphere, passing output of a stack as input to another

Suppose I'm defined two stacks, A and B. In stack A, I define a VPC and a subnet and I output that subnet's id t = Template() Subnet = t.add_resource(Subnet .....) SubnetId = t.add_output(Output('SubnetId', Value=Ref(Subnet)) In Stack B, I have…
mingxiao
  • 1,712
  • 4
  • 21
  • 33
1
vote
2 answers

How do I add a scaling policy into cloudformation with troposphere?

I've create a python troposphere script that's been working quite well overall. I just added in a new piece of code to add a policy to the autoscaling group for an alarm. The code looks like: tintScaleDown =…
efreedom
  • 253
  • 3
  • 8
1
vote
1 answer

AWS CloudFormation add condition in s3bucket using troposphere

Following code is working for EC2 and it is adding the condition statement in the output, but for S3 its not producing the condition statement. I can manually add this statement to make it work, but that has many disadvantages. from __future__…
Anup Singh
  • 313
  • 1
  • 5
  • 18
0
votes
1 answer

Invalid / Unmodifiable / Unsupported DB Parameter: time_zone gives cloud-formation

I tried to add a DBClusterParameterGroup to aurora postgresql engine. For that I used below command. db_cluster_params = self.add_resource( rds.DBClusterParameterGroup( "CustomAuroraRDSClusterParamGroup", …
prime
  • 769
  • 1
  • 13
  • 27
0
votes
0 answers

troposphere IAM role arn circular dependency error

I have created an iam role with troposphere but getting a circular dependency error when provisioning the resource with Cloudformation. My iam role has a trust policy to assume its own arn and I think the circular dependency error is due to the role…
0
votes
1 answer

Is there anyway to use try/catch in troposphere?

I'm using sceptre user data and I can't use AWS::NoValue with it. Since I don't want to change the current template much, I want to do a workaround but I see a warning in try line, which is Expected expression Pylance. How can I use try catch in…
cosmos-1905-14
  • 783
  • 2
  • 12
  • 23