aws-cloudformation-templates | Examples for AWS CloudFormation templates | AWS library
kandi X-RAY | aws-cloudformation-templates Summary
kandi X-RAY | aws-cloudformation-templates Summary
Examples for AWS CloudFormation templates
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of aws-cloudformation-templates
aws-cloudformation-templates Key Features
aws-cloudformation-templates Examples and Code Snippets
Community Discussions
Trending Discussions on aws-cloudformation-templates
QUESTION
I have a cloudformation template with an efs filesystem and an instance launch configuration. I need to reference the efs filesystem id in the UserData script, as I want to mount the efs on launch. I've tried it with echo ${!Ref EFSFileSystem}
like this:
ANSWER
Answered 2021-May-14 at 22:12You have a !Sub
on the string already, so instead of ${!Ref EFSFileSystem}
you just need to do ${EFSFileSystem}
. That will be replaced with the default output of the resource, in this case, the Id
.
QUESTION
I'm trying to create an AWS S3 Bucket with cloud formation.
S3 bucket name needs to be lowercase but I want to use a paramenter to compound that name. This parameter comes uppercase.
I founded a way.
I read this.
This is my code:
...ANSWER
Answered 2021-Jan-18 at 23:00Important point to note to get the syntax right is to use Json with Yaml when using multiple Intrinsic functions.
Updated syntax below. For Environment value DEV
, this creates a bucket of name content-input-dev
QUESTION
I'm trying to Transform one of the keys passed to FindInMap. The example I was trying to follow comes from here:
...ANSWER
Answered 2020-Sep-17 at 08:46This is a syntax error. One example how it should be for the Replace
operation is given in the repository. Here is a template that I was able to deploy, it uses Transform
inside FindInMap
and creates an S3 bucket with a test-key:test-value
tag:
QUESTION
I have a CloudFormation template that create ec2 instances using LaunchTemplate, but I want to add cloudwatch agent to the instances, but I can't figure what's wrong.
I have 2 configSets, but the cfn-init get stuck in "02_download_app" > "Command run_app", this part I run a jar file from /.
Here is the output from /var/log/cfn-init-cmd.log
, I noticed that after the command run_app the jar get stucked 17:25
, and some time later 17:42
I connect to the instance kill the jar and relaunch and it continues the script successfully, I think the error is some encoding problem, but I don't know where: in the jar? in log4j config file?, etc.
ANSWER
Answered 2020-Jun-24 at 01:38I guess you are referring this sudo java -jar /tmp/app.jar &
? I think you should kill it in your Init
after your test
finishes.
One way to do this could be as follows:
QUESTION
I am using the explode transform macro in the following manner.
...ANSWER
Answered 2020-Feb-25 at 10:14Not really sure what the difference between !Sub 'LoadBalancerRule${!Explode Prefix}'
& - LoadBalancerRule!Explode Prefix
is, but this worked out
QUESTION
I have cloned this repo and deployed the Count stack successfully.
...ANSWER
Answered 2020-Jan-19 at 17:11Because Count is a macro, not a custom resource. A macro is a preprocessor for the Cloudformation template. It takes the template, changes it and outputs a new template. Cloudformation then carries on creating the stack using the updated template.
When you delete the stack, it deletes all resources defined in the stack so there is no need to call the macro again.
In contrast a custom resource is executed at deployment and is used to control resources that Cloudformation doesn't support or to implement other custom logic. The custom resource will be invoked when the stack is deleted to give it a chance to clear up the resources it created.
QUESTION
I'm trying to access DynamoDB from my Fargate task, which is written in golang. And all I get is a timeout. What I am missing?
I'm using the Cloudformation templates from AWS Labs (here) plus a task role that allows full DynamoDB access. It's the simplest public subnet template plus the Fargate one.
I tried adding a VPC endpoint, but it made no difference.
Running the task on my machine works. Running a Python (Flask) task that does (more or less) the same works both locally and on AWS. It's the same setup, I just changed the task image.
This is the code:
...ANSWER
Answered 2019-Oct-01 at 23:15Timeout is often a network Issue. Have you checked security groups used by both the ECS task and Dynamo DB. Need to make sure you have rules setup to egress out of ECS and ingress into DynamoDB on the correct ports.
You said you setup an endpoint for Dynamo in the VPC. Not clear from your OP if you are trying to connect to private endpoint in a private VPC or if you are trying to go through the public internet. If you are trying to go through public internet you need to also check that your ECS task is in a VPC that has a NAT gateway out to the public internet. It looks like you are trying to connect through 127.0.0.1 or an ELB DNS to connect to the DynamoDB service which doesn't make sense to me.
QUESTION
I am trying to create a S3 only user who will by definition have no access to any other resource. The user can upload and download files from S3. I have created a basic template that can be found here...
But it is allowing access to cloudformation that is not necessary in my case. I have read the following pages, but do not know how to include them in my template.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html
https://docs.aws.amazon.com/AWSCloudForation/latest/UserGuide/aws-properties-iam-group.html
What are the minimum parameters required to create a S3 only user?
Update: Here is the cloudformation code that I tried and the error that I got:
error message: The following resource(s) failed to create: [CFNRole, CFNUser]. . Rollback requested by user.
The template:
...ANSWER
Answered 2019-May-05 at 09:29You are explicit giving your new user access to Cloudformation in your template. You have this section:
QUESTION
Is an Elastic IP obligatory for a NAT instance? Or can I just continue with a public IP?
The CloudFormation template samples (like the one here) feature an elastic IP address but I am not a fan of assigning one if not really a must.
...ANSWER
Answered 2019-Mar-30 at 10:28No, Elastic IP is not obligatory for NAT instance. You can continue with the Public IP address. Elastic IP requires when you go with the NAT Gateway.
QUESTION
The main question: How to I reference dependent resource attributes in a cloud formation template to build out a user data script.
What I have tried:
- Approach listed here.
- Examples from sub function
I am building a CloudFormation template for a three node Kafka cluster.
The approach I am taking here is configuring Zookeeper and Kafka on each node of the cluster using a UserData script on the EC2 instance.
I am using the Sub and Base64 functions to populate my user data script with the PrimaryPrivateIpAddress
of my NetworkInterface but they are coming across as empty strings instead of the actual values. I know that the values are being populated correctly because they are part of my output in the template.
I have included the resource block of my template below as a reference. I omitted some uninteresting parts for the sake of succinctness. I also am illustrating a couple different approaches that I have tried to the EC2 resource blocks are not consistent.
...ANSWER
Answered 2018-Feb-05 at 16:43I think you're on the right path. I would just modify a bit the way you pass the 3 "private" substitute variables, for something like this (which I use quite often in my templates):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-cloudformation-templates
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page