amazon-cloudformation

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

扶醉桌前 提交于 2019-12-01 19:12:46
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" Outputs: AsgArn: Value: !Ref "AutoScalingGroup" AsgMinSize: Description: "The minimum size of the Auto

AWS lambda: No module named 'cfnresponse'

霸气de小男生 提交于 2019-12-01 18:29:52
I have deployed an AWS lambda which contains: import json import boto3 import cfnresponse import urllib.request from botocore.exceptions import ClientError def lambda_handler(event, context): ... cfnresponse.send(event, context, status, responseData, "CustomResourcePhysicalID") I tried to get the values of the cfnresponse in my cloudformations: Resources: API: Type: Custom::API Version: '1.0' Properties: ServiceToken: arn:aws:lambda:eu-west-1:413541824355:function:getCountry Outputs: Status: Value: !GetAtt API.Data Now th cfn is stuck and I got the error: Unable to import module 'lambda

Howto specify 'Raw Message Delivery' for an SNS subscription using AWS CloudFormation?

↘锁芯ラ 提交于 2019-12-01 18:08:26
I've got an AWS CloudFormation template that creates an SNS topic and a subscription: "AcceptedTopic":{ "Type": "AWS::SNS::Topic", "Properties": { "DisplayName": {"Fn::Join": ["", ["Accepted-", {"Ref": "Env"}]]}, "TopicName": {"Fn::Join": ["", ["Accepted-", {"Ref": "Env"}]]}, "Subscription": [{ "Endpoint": {"Fn::GetAtt" : [ "SomeQueue" , "Arn" ]}, "Protocol": "sqs" }] } } I need to specify the 'Raw Message Delivery' subscription attribute. How can I do that in AWS CloudFormation ? Now AWS CloudFormation supports it with AWS::SNS::Subscription . So instead of adding the subscription as a

Howto specify 'Raw Message Delivery' for an SNS subscription using AWS CloudFormation?

馋奶兔 提交于 2019-12-01 16:23:53
问题 I've got an AWS CloudFormation template that creates an SNS topic and a subscription: "AcceptedTopic":{ "Type": "AWS::SNS::Topic", "Properties": { "DisplayName": {"Fn::Join": ["", ["Accepted-", {"Ref": "Env"}]]}, "TopicName": {"Fn::Join": ["", ["Accepted-", {"Ref": "Env"}]]}, "Subscription": [{ "Endpoint": {"Fn::GetAtt" : [ "SomeQueue" , "Arn" ]}, "Protocol": "sqs" }] } } I need to specify the 'Raw Message Delivery' subscription attribute. How can I do that in AWS CloudFormation ? 回答1: Now

Setting up CodePipeline template to deploy CloudFormation stack from CodeCommit

£可爱£侵袭症+ 提交于 2019-12-01 12:50:44
From a CloudFormation template, you can deploy CodeCommit and CodePipeline . From this announcement , You can now choose AWS CloudFormation as a deployment action in your release workflows built using AWS CodePipeline. I've worked out most of the Cloudformation Template, but I can't figure out the stages. Resources: PipelineRepo: Type: AWS::CodeCommit::Repository Properties: RepositoryName: pipeline RepositoryDescription: Pipeline setup repo PipelineArtifacts: Type: AWS::S3::Bucket PipelineRole: Type: AWS::IAM::Role Pipeline: Type: AWS::CodePipeline::Pipeline Properties: Name: pipeline

Installing packages using apt-get in CloudFormation file

戏子无情 提交于 2019-12-01 08:21:37
I've got the following CloudFormation script. The stack is being created and the Ec2 instance launches, and I can SSH in but it's not installing the packages. I'm not sure where it's failing at. I'm using Ubuntu. I can't find were cfn-init is installed on my instance? Or is it only installed for Amazon Linux AMIs? How do I go about troubleshooting this? { "Parameters" : { "ShinyKey": { "Description": "Key pair for instance.", "Type": "AWS::EC2::KeyPair::KeyName" } }, "Resources": { "Ec2Instance" : { "Metadata": { "AWS::CloudFormation::Init": { "config": { "packages": { "apt": { "r-base-dev": [

Installing packages using apt-get in CloudFormation file

拥有回忆 提交于 2019-12-01 06:06:45
问题 I've got the following CloudFormation script. The stack is being created and the Ec2 instance launches, and I can SSH in but it's not installing the packages. I'm not sure where it's failing at. I'm using Ubuntu. I can't find were cfn-init is installed on my instance? Or is it only installed for Amazon Linux AMIs? How do I go about troubleshooting this? { "Parameters" : { "ShinyKey": { "Description": "Key pair for instance.", "Type": "AWS::EC2::KeyPair::KeyName" } }, "Resources": {

AWS Service Unable To Assume Role

别来无恙 提交于 2019-12-01 00:38:50
I've two AWS Cloudformation stacks, one for IAM roles and the second to create an AWS service and import the respective roles into it using Cloudformation. When 10+ services are deployed the following error appears randomly on 1 or 2 of the services - AWS::ECS::Service service Unable to assume role and validate the listeners configured on your load balancer. Please verify that the ECS service role being passed has the proper permissions. If all the services are torn down and the services redployed to the ECS cluster, the error appears but for different services. The AWS fix for this can be

Deploy IIS Website with CloudFormation template

廉价感情. 提交于 2019-12-01 00:01:02
I have a Visual Studio (C#) deployment package (.zip) that I have pushed up to my S3 storage. I want to run my CloudFormation script and have it create an instance of an IIS server (I have the script for this) and then deploy the Visual Studio web site to it from the S3 storage. I'm looking for an example of the temple json that would do that Edwin I have a template that does something similar to what you are looking for. Below is a template that I use. It may be more than you need, because it has an auto scaling group, but it will get you started. Basically, you need the IAM user to interact

CloudFormation: Create resources if they do not exist, but do not delete them

北城余情 提交于 2019-11-30 21:21:34
I have the following CloudFormation template. (It is based off default the template created for running C# Web API in AWS Lambda, but that may not be relevant.) It creates an AWS Lambda function. The template also creates an IAM Role and a DynamoDB table if the names of existing resources are not supplied as arguments. That part works. If no names are supplied for the role and table, they are created. The problem exists when I run the template a second time to perform updates: at this point, my role and table exist, so I provide the names as arguments. However, when CloudFormation runs the