aws-cloudformation-templates | A collection of useful CloudFormation templates
kandi X-RAY | aws-cloudformation-templates Summary
kandi X-RAY | aws-cloudformation-templates Summary
The AWS CloudFormation team and approved contributors provide and maintain sample templates in the aws folder. We also collect and make available templates developed by the community. These sample templates are located in the community folder and its subfolders. We encourage your contributions to these templates. Note, however, that we don't test, maintain, or support community templates.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Handler for events
- Set the logging configuration
- Given a section transform it into a dictionary
- Helper function for recursively walk through the resource
- Apply transformations to a fragment
- Create and update a directory
- Enable SSO for a directory
- Creates a directory alias
- Registers a directory monitoring topic
- Handles Lambda Lambda function
- Custom raise exception handler
- Get the VPC route table ID
- Run a CloudFormation create operation
- Update a stack set
- Get the prefix list ID for a given prefix list
- Aggregate a list of accounts
- Groups instances by account and overrides
- Delete a stack set
- Disable a directory
- Deregisters a directory monitoring topic
- Get the registered event topics
- Create a CloudFormation stack
- Get adconnector parameters
- Configure logging
- Transform the given fragment into a single fragment
- Send a failure message
aws-cloudformation-templates Key Features
aws-cloudformation-templates Examples and Code Snippets
brew install python3
brew install node
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
npm install -g npm --registry=https://registry.npmjs.org/
npm install -g grunt-cli --registry=https://registry.n
mkdocs serve
grunt deploy-all --region-us-east-1 --bucket= --cfnstack=
grunt deploy-skipinfra --region-us-east-1 --bucket= --cfnstack=
Usage python cf-validator.py --cf_path CF_Template_File --cf_rules Rules_File --cf_res Resource_File --allow_cap no --region us-east-1
#!/usr/bin/env python
"""
Converted from ElastiCache_Redis.template located at:
http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
In addition to troposphere, this script requires awacs (Amazon Web Access
Control Subsystem)
"""
imp
#!/usr/bin/python
# Converted from VPC_With_VPN_Connection.template located at:
# http://aws.amazon.com/cloudformation/aws-cloudformation-templates
from troposphere import (
Base64,
FindInMap,
GetAtt,
Join,
Output,
Parameter,
# Converted from VPC_With_VPN_Connection.template located at:
# http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
from troposphere import Join, Output, Parameter, Ref, Tags, Template
from troposphere.ec2 import (
VPC,
Custom
Community Discussions
Trending Discussions on aws-cloudformation-templates
QUESTION
I am attempting to run a CloudFormation using AWSUtility::CloudFormation::CommandRunner and it fails with
...ANSWER
Answered 2021-Dec-28 at 21:11The first problem is the code at https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-awsutilities-commandrunner.git does not work... the repository is abandoned.
maslick's repository listed in the accompanying shell does work, if you pull the correct branch (also in this shell script). if you pull the correct branch. You will also need the correct role, also in this post.
Shell script to install commandrunner using cloudshell:
QUESTION
I have a cloud formation template where I have all the resources and details for the project.
I have the cfn-lint setup locally and it is running perfectly fine. However when I push the code changes, build fails at deployment stage due to cfn-nag stating some simple changes which could be fixed.
I'm using windows machine and I need a way to run this cfn-nag locally so that I could check this just like cfn-lint and fix them locally instead of waiting 40 minutes for build till it reaches deployment stage.
I referred several posts online, found below two helpful
https://stelligent.com/2018/03/23/validating-aws-cloudformation-templates-with-cfn_nag-and-mu/ https://github.com/stelligent/cfn_nag
What is the difference between cfn-nag and cfn-lint and why lint is not failing on what cfn-nag is complaining about?
The above links have some instructions on Ruby and Brew but I'm using Nodejs, felt lost. Please help.
...ANSWER
Answered 2021-Jul-15 at 10:53CFN-Nag looks for patterns in AWS CloudFormation templates that may indicate insecure infrastructure,
Ex:
IAM rules that are too permissive (wildcards), Security group rules that are too permissive (wildcards), Access logs that aren’t enabled, Encryption that isn’t enabled,
CFN-Lint scans the AWS CloudFormation template by processing a collection of Rules, where every rule handles a specific function check or validation of the template. It validates against AWS CloudFormation Resource specification.
This collection of rules can be extended with custom rules using the --append-rules argument.
Ex: Whitespaces, alignment(YAML), type checks, valid values for resource properties, and other best practices.
Those two links you previded above have all the information needed, just not directly for a Nodejs developer using a Windows machine.
Step1: Pull the docket image stelligent/cfn-nag
Step2: Add the script to your package.json for cfn-nag
Ex:
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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-cloudformation-templates
You can use aws-cloudformation-templates like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
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