amazon-cloudformation

UpdatePolicy in Autoscaling group not working correctly for AWS CloudFormation update

穿精又带淫゛_ 提交于 2020-01-14 13:37:08
问题 I am using AWS CloudFormation to launch my server stack. I have created a LaunchConfig and then AutoScaling group that uses the above launchconfig. I have set CreationPolicy which waits for signals from my EC2 instances which creating the CF stack. Also, i have set UpdatePolicy to AutoScaling group to wait for the signals from new instances if i update the CF stack with more desired number of instances as follows: "UpdatePolicy" : { "AutoScalingRollingUpdate" : { "PauseTime" : "PT10M",

AWS: How does CloudFormation know a template has been deployed?

偶尔善良 提交于 2020-01-14 05:40:14
问题 In this article, there is a nice explanation about CloudFormation. If you don’t know CloudFormation, then it’s important to know that CloudFormation is the Infrastructure as Code (IaC) solution of AWS. It is in the same category of tools as Terraform (a very good comparison between CloudFormation and Terraform can be found here). With CloudFormation you can declaratively specify the AWS infrastructure that you need for your cloud application in a YAML or JSON file, called a template, and then

AWS Lambda in VPC sometimes doesn't have internet access

假如想象 提交于 2020-01-14 01:43:06
问题 I have Lambda which was deployed to VPC. This deploymens has next configs: VPC (192.168.0.0/16) Public Subnet A (192.168.32.0/20) has NAT Gateway and Route 0.0.0.0/0 to Internet Gateway Private Subnet A (192.168.48.0/20) has Route 0.0.0.0/0 to NAT Gateway Private Subnet B (192.168.64.0/20) Lambda has own Securiy Group and references to "Private Subnet A" and "Private Subnet B" I have strange problem: time to time Lambda doesn't have Internet Access . 3rd party service works normal. One more

AWS SQS trigger Step Functions

自作多情 提交于 2020-01-13 10:13:50
问题 Quick question: Is it possible to trigger the execution of a Step Function after an SQS message was sent?, if so, how would you specify it into the cloudformation yaml file? Thanks in advance. 回答1: The first think to consider is this: do you really need to use SQS to start a Step Functions state machine? Can you use API gateway instead? Or could you write your messages to a S3 bucket and use the CloudWatch events to start a state machine? If you must use SQS, then you will need to have a

Returning the outputs from a CloudFormation template with Boto?

主宰稳场 提交于 2020-01-13 09:40:10
问题 I'm trying to retrieve the list of outputs from a CloudFormation template using Boto. I see in the docs there's an object named boto.cloudformation.stack.Output . But I think this is unimplemented functionality. Is this currently possible? 回答1: If you do a describe_stacks call, it will return a list of Stack objects and each of those will have an outputs attribute which is a list of Output objects. Is that what you are looking for? 来源: https://stackoverflow.com/questions/14163114/returning

AWS Cloudformation- How to do string Uppercase or lowercase in json/yaml template

谁都会走 提交于 2020-01-13 05:16:11
问题 I am working on AWS CloudFormation and I created one template in which I asked user to select Environment. On the basis of selected value I created the resources. User have to select between DEV, QA, PROD, UAT etc. but when I suffix this value to S3 bucket name (-downloads.com) it not allowed because capital letter is not allowed in S3 bucket name. So I did change in JSON where I use fn::Transform with "Condition":"Lower" but then while creating resources below error occurs. No transform

The deployment specifies that the revision is a null file, but the revision provided is a zip file

不想你离开。 提交于 2020-01-13 05:08:29
问题 I am using CodeDeploy integrated into CodePipeline . I am trying to deploy an image from ecr to ecs . The whole infrastructure is built with CloudFormation . The template for the Pipeline deployment group : ApplicationName=cls.application.ApplicationName, DeploymentGroupName='DeploymentGroup', DeploymentConfigName='CodeDeployDefault.ECSAllAtOnce', ServiceRoleArn=GetAtt(cls.role, 'Arn'), AutoRollbackConfiguration={ 'enabled': True, 'events': ['DEPLOYMENT_FAILURE', 'DEPLOYMENT_STOP_ON_ALARM',

The deployment specifies that the revision is a null file, but the revision provided is a zip file

杀马特。学长 韩版系。学妹 提交于 2020-01-13 05:08:08
问题 I am using CodeDeploy integrated into CodePipeline . I am trying to deploy an image from ecr to ecs . The whole infrastructure is built with CloudFormation . The template for the Pipeline deployment group : ApplicationName=cls.application.ApplicationName, DeploymentGroupName='DeploymentGroup', DeploymentConfigName='CodeDeployDefault.ECSAllAtOnce', ServiceRoleArn=GetAtt(cls.role, 'Arn'), AutoRollbackConfiguration={ 'enabled': True, 'events': ['DEPLOYMENT_FAILURE', 'DEPLOYMENT_STOP_ON_ALARM',

AWS CloudFormation stack fails with error Received 0 SUCCESS signal(s) out of 1

泪湿孤枕 提交于 2020-01-11 09:23:06
问题 My AWS CloudFormation template fails with the error: Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement I'm thinking my WaitConditionHandles are not set correctly (or maybe the EC2 instance is not sending one), but not sure how to fix this. Everything (ASG, EC2 instances) does appear to be created correctly in AWS. I'm using the following CloudFormation template: AWSTemplateFormatVersion: "2010-09-09" Description: "Auto Scaling Group"

How to pass yamel file content to cloud formation nested stack?

99封情书 提交于 2020-01-06 18:42:45
问题 I tried this in many ways: aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile="$(cat config.yaml)" and aws cloudformation deploy --stack-name agent-prod --template-file prod-agent.yaml --region eu-central-1 --parameter-overrides ConfigFile=fileb://config.yaml but it didn't work. is there a good way and known to do that? 回答1: You can't currently pass your parameters in YAML format. It's a commonly requested