amazon-cloudformation

RDS with Cloud Formation and AZ issues

只谈情不闲聊 提交于 2019-12-03 22:39:17
I am using cloud formation to create a setup containing an RDS instance. I am having some difficulties creating the RDS Instance on the account of the following error: DB Subnet Group doesn't meet availability zone coverage requirement. Please add subnets to cover at least 2 availability zones. Current coverage: 1 The problem is that the entire setup is on a single AZ... what am i supposed to do? just create an extra subnet in a different AZ that has nothing in it just for the RDS? Maybe there is some way AWS can create that subnet automatically and leave me out of that mess. I don't want that

Passing Parameters in Nested Cloud Formation templates

余生颓废 提交于 2019-12-03 21:20:59
I am calling CFT2 from CFT1 and I am passing a list of parameters.I recently came to know that we cant pass comma delimited list of parameters, so I am looking how to achieve that solution . This is my CFT1 : { "AWSTemplateFormatVersion": "2010-09-09", "Description": "Top Stack", "Resources": { "ChildStack01": { "Type" : "AWS::CloudFormation::Stack", "Properties" : { "TemplateURL": "https://s3.amazonaws.com/tbdchef/frontend1.json", "Parameters": { "AvailabilityZone1a": { "Default": "us-east-1a", "Description": "us-east-1a", "Type": "String" }, "AvailabilityZone1b": { "Default": "us-east-1b",

How to specify all ports in Security group - CloudFormation

て烟熏妆下的殇ゞ 提交于 2019-12-03 15:56:17
问题 I have my CloudFormation script like this now: "SecurityGroupIngress" : [{ "IpProtocol" : "tcp", "FromPort" : "0", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }] and it looks like this, which is fine: But I am wondering how to I update the template to get this: Notice the Ports say All. I also wonder if they are different? 回答1: The original solution I posted (and accepted by the original poster) stopped working as AWS no longer supports it. To avoid the barrage of downvotes, I deleted the

CodePipeline: How to reference nested CloudFormation Stacks from GitHub as Source

谁说胖子不能爱 提交于 2019-12-03 15:47:20
Our CloudFormation templates are stored in GitHub. Inside CodePipeline we're using GitHub as our Source, but we can't reference nested CloudFormation Stacks when they're not stored on S3. How can we reference CloudFormation nested Stacks when using GitHub as our source in CodePipeline? If this is not possible, how can we upload the CloudFormation Templates from GitHub to S3 between the Source Stage (from GitHub) and the Deploy Stage in CodePipeline? There are two approaches I can think of to reference nested CloudFormation Stacks from a GitHub source for a CodePipeline deployment: 1. pre

CloudFormation AutoScalingGroup not waiting for signal on update/scale-up

青春壹個敷衍的年華 提交于 2019-12-03 12:47:38
问题 I'm working with a CloudFormation template that brings up as many instances as I request, and want to wait for them to finish initialising (via User Data) before the stack creation/update is considered complete. The Expectation Creating or updating the stack should wait for signals from all newly created instances, such to ensure that their initialisation is complete. I don't want the stack creation or update to be considered successful if any of the created instances fail to initialise. The

Can I setup AWS Cognito User Pool Identity Providers with Cloudformation?

笑着哭i 提交于 2019-12-03 12:21:20
问题 I want to setup a cognito user pool and configure my google identity provider automatically with a cloudformation yml file. I checked all the documentation but could not find anything even close to doing this. Any idea on how to do it? 回答1: It seems a lot of Cognito details are not supported within Cloudformation as of right now, but there are ways to achieve what you want after the stack spins up, e.g. using Lambdas. See the following answers: Cannot set a property of cognito userpool client

Can't create a SNS Event source on a Lambda function using CloudFormation

删除回忆录丶 提交于 2019-12-03 12:06:35
问题 This is the Cloudformation template code related to my problem: "SNSTopic": { "Type": "AWS::SNS::Topic", "Properties": { "TopicName": "JumpboxPresenceTopic", "DisplayName": "Jumpbox Presence Topic", "Subscription": [ { "Endpoint": { "Fn::GetAtt": [ "Lambda", "Arn" ] }, "Protocol": "lambda" } ] } }, "Lambda": { "Type": "AWS::Lambda::Function", "Properties": [...] I can see the topic in the SNS dashboard: But it does not display in the lambda function Event Sources panel: The weird thing about

How to escape “${}” in cloudformations “Fn::Sub”

断了今生、忘了曾经 提交于 2019-12-03 11:29:10
问题 I want this resource to work with the !Sub (or Fn::Sub ) intrinsic function Resource: !Sub 'arn:aws:iam::${AWS::AccountId}:user/${aws:username}' The aws:username is a pollicy variable that mustn't be replaced. One solution would be to use Fn::Join instead and write a bit more boilerplate code. Better: Can you escape the ${aws:username} so that !Sub will work here? Unfortunately, the documentation does not mention anything about escaping. 回答1: You actually can escape "$" characters with "${!}"

Is there a way to tag a root volume when initializing from the cloudformation template?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 10:45:06
I am creating an instance through the cloud formation script. The only way I found to attach an OS partition was through "BlockDeviceMappings" property. (I've tried to use "Volumes" property before, but the instance could not be mounted, the system told me that /dev/sda was already mapped and rolled back the instance creation) Here is the relevant portion of my template: "Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "BlockDeviceMappings" : [{ "DeviceName" : "/dev/sda", "Ebs" : { "VolumeSize" : { "Ref" : "RootVolumeSize" }, "SnapshotId" : { "Fn::FindInMap" :

AWS ECS Create Scheduled Tasks (cron) via Cloudformation

拥有回忆 提交于 2019-12-03 10:35:11
We want to create ScheduledTasks in AWS ECS via CloudFormation. Is there a programmatic way to create via boto or cloudformation? In order to define a scheduled ECS task in CloudFormation, you need to define a "AWS::Events::Rule" resource with an ECS task as a target. "TaskSchedule": { "Type": "AWS::Events::Rule", "Properties": { "Description": "dump data every workday at 10", "Name": "dump-data", "ScheduleExpression": "cron(0 10 ? * MON-FRI *)", "State": "ENABLED", "Targets": [ { "Id": "dump-data-ecs-task", "RoleArn": { "Fn::GetAtt": ["TaskSchedulerRole", "Arn"] }, "EcsParameters": {