amazon-cloudformation

How to create some random or unique value in a CloudFormation template?

雨燕双飞 提交于 2020-02-06 11:24:02
问题 Is there a way to create some kind of random or unique value in a CloudFormation template? Why I need this. In our templates we have a number of custom-named resources, for instance AWS::AutoScaling::LaunchConfiguration with specified LaunchConfigurationName or AWS::AutoScaling::AutoScalingGroup with specified AutoScalingGroupName . When updating stacks, we often get the following error: CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename some-stack

ECS service did not stabilize

坚强是说给别人听的谎言 提交于 2020-02-05 08:26:15
问题 Answer did not have pointers for this problem, because rollback deletes the stack. Below is the CloudFormation template, written to launch Jenkins docker container in ECS container instance(DesiredCount: 1), in default public subnet. Jenkins docker image is publicly available in dockerhub, which is launched in ECS container instance. We used ECS optimised AMI image( ami-05958d7635caa4d04 ) ca-central-1 region, that run docker version 18.06.1 . { "AWSTemplateFormatVersion": "2010-09-09",

ECS::TaskDefinition - What is the maximum value of 'Memory' property?

試著忘記壹切 提交于 2020-02-05 05:48:10
问题 here in this syntax of "ContainerDefinitions":[{Memory:500}] in AWS::ECS::TaskDefinition , Memory property refers to virtual address space(hard limit) of docker container process in root CGROUP. We are launching a jenkins container process on AWS EC2 using cloudformation resource type AWS::ECS::TaskDefinition . AWS EC2 is a 64 bit Linux OS. On 32 bit Linux OS, virtual address space of a process, can go upto 3 GB. On 64 bit Linux OS, virtual adress space of a process, can go upto Terabytes. We

How to update a AWS::Lambda::Version always to $LATEST in a CF template

大憨熊 提交于 2020-02-04 06:42:30
问题 I have a Cloudformation template with a Lambda@Edge function. This means I need the lambda function, and a Version (type WS::Lambda::Version). Now, the first time I create the CF template, it works. But when I update the CF template and the Lambda function is updated, the Lambda version does not get updated (kind of makes sense, it did not change!). How can I force the Lambda version to update when the Lambda function updates? 回答1: You can create a script that edits the template before

How to update a AWS::Lambda::Version always to $LATEST in a CF template

╄→гoц情女王★ 提交于 2020-02-04 06:42:26
问题 I have a Cloudformation template with a Lambda@Edge function. This means I need the lambda function, and a Version (type WS::Lambda::Version). Now, the first time I create the CF template, it works. But when I update the CF template and the Lambda function is updated, the Lambda version does not get updated (kind of makes sense, it did not change!). How can I force the Lambda version to update when the Lambda function updates? 回答1: You can create a script that edits the template before

EcsService did not stabilize after hours

孤人 提交于 2020-02-03 16:19:12
问题 I have written a cloudformation JSON file from scratch, but i can't deploy the stack and i don't have any information from AWS about why... It gets stuck at the service CREATE_IN_PROGRESS for 4/5 hours, then it says that the service did not stabilize and rollback. When i check the cluster, it says it is "active" and everything looks fine from the AWS dashboard. I guess the container meet an issue, or maybe something wrong with the health check, but i don't get any information from

How can I use api gateway stages via cloudformation or sam?

北城以北 提交于 2020-02-03 09:57:28
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

How can I use api gateway stages via cloudformation or sam?

喜夏-厌秋 提交于 2020-02-03 09:56:09
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

How can I use api gateway stages via cloudformation or sam?

蹲街弑〆低调 提交于 2020-02-03 09:56:04
问题 I am using AWS SAM to deploy my lambda and api gateway. Below is my template yaml file: AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: > sam-app Sample SAM Template for sam-app # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 3 Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs

How to define a CloudWatch Alarm on the sum of two metrics with CloudFormation?

好久不见. 提交于 2020-02-02 16:26:27
问题 I need to trigger an alarm when the sum of the same metric ( ApproximateNumberOfMessagesVisible ) on two different queues exceed the value of 100 In September '17, this answer stated that the only way to do it was with a Lambda function getting the two values and summing them up via CloudWatch API. At writing time, Feb. '19, it is possible to use "Metric Math", so there is no need to have a lambda function or an EC2 instance. Is it possible to use Metric Math to define an Alarm directly in