amazon-cloudformation

AWS EC2 UserData Script Doesn't Fire on t3 instances

此生再无相见时 提交于 2020-04-18 03:47:29
问题 I have a pretty simple userdata script that installs the CodeDeploy agent on ubuntu and then emits a signal to CloudFormation indicating the instance is healthy. My stack is deployed using CloudFormation, which sets up an ASG, LaunchTemplate, TargetGroup, etc. The target instance type is Ubuntu 18.04 (ami-07ebfd5b3428b6f4d AMI) on t3.small instances. I previously had the same problem on a different AMI, but upgrading to ami-07ebfd5b3428b6f4d seemed to fix it temporarily...it worked for

S3 Creation CloudFormation results in 400 Bad Request

孤街醉人 提交于 2020-04-14 03:44:26
问题 I have this problem when creating S3 bucket using CloudFormation. I get a 400 Bad request. Would appreciate if anyone can help. aws cloudformation deploy --profile DEV --stack-name testBucket --template-file create_bucket.yml --region us-east-1 --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --parameter-overrides BucketName=myBucket Template: AWSTemplateFormatVersion: 2010-09-09 Parameters: BucketName: Description: Provisioned read throughput for each table Type: String Resources: MYBUCKET

Difference between SAM template and Cloudformation template

依然范特西╮ 提交于 2020-04-10 07:05:29
问题 I'm finding it hard to understand the difference between SAM template and Cloudformation template. I know that SAM template can be used to define Serverless Applications like Lambda, but how does that make it different from Cloudformation template? Is the syntax different? I can still specify the Lambda definitions in cloudformation template. So, my question is why should I care about SAM? Won't knowing about just cloud formation template be sufficient? 回答1: From CloudFormation's perspective,

Drawing an image from a cloudformation template

╄→尐↘猪︶ㄣ 提交于 2020-04-06 19:24:07
问题 Is the any drawing / export tool that I can use to turn a cloudformation template into a diagram. In need to export my cloudformation stack into an image , or a graphviz file. Regards, 回答1: You can use the AWS CloudFormation designer. Click on Open , then upload your template. Finally take a screenshot of the result to have it in an image format. Here's an exemple of what the result might look like: For more information, have a look at the doc. 回答2: You can use the latest version of the cfn

Cloudformation stack shows as complete before execution of all user data

别来无恙 提交于 2020-03-22 11:39:56
问题 In my cloudformation stack, I have a launch config which runs ansible scripts in the user data. The problem here is, my stack status shows CREATE_COMPLETE even if the ansible scripts have not completed exacution. After I ssh into the ec2 instance, I see the logs which shows the ansible execution still in progress. My sample cloudformation stack json is something like this: "OpenShiftMasterASLaunchConfig": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Metadata": { "AWS::CloudFormation:

Cloudformation stack shows as complete before execution of all user data

旧城冷巷雨未停 提交于 2020-03-22 11:39:08
问题 In my cloudformation stack, I have a launch config which runs ansible scripts in the user data. The problem here is, my stack status shows CREATE_COMPLETE even if the ansible scripts have not completed exacution. After I ssh into the ec2 instance, I see the logs which shows the ansible execution still in progress. My sample cloudformation stack json is something like this: "OpenShiftMasterASLaunchConfig": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Metadata": { "AWS::CloudFormation:

Does CloudFormation expose the Reader Endpoint of a Redis ElastiCache Replication Group?

强颜欢笑 提交于 2020-03-22 07:45:27
问题 I need to expose the Reader Endpoint of my Redis ReplicationGroup so it can be used by dependent CloudFormation stacks. I've previously used the primary endpoint, which is available as a CloudFormation return value, but I now need to use the Reader Endpoint, introduced in June 2019 [https://aws.amazon.com/about-aws/whats-new/2019/06/amazon-elasticache-launches-reader-endpoint-for-redis/]. However the Reader Endpoint does not appear in the Return Values in the CloudFormation documentation

CloudFormation - always use latest AMI

試著忘記壹切 提交于 2020-03-18 12:06:51
问题 The blog post Query for the latest Amazon Linux AMI IDs using AWS Systems Manager Parameter Store | AWS Compute Blog describes how to always reference the latest version of an distribution in a CloudFormation template. # Use public Systems Manager Parameter Parameters: LatestAmiId: Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>' Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2' Resources: Instance: Type: 'AWS::EC2::Instance' Properties: ImageId: !Ref LatestAmiId

Do AWS support SES in CloudFormation?

折月煮酒 提交于 2020-03-18 11:47:51
问题 I'm trying to figure out how to automate the creation of several cloud resources in AWS, using CloudFormation. Now I need to include the creation of SES (Simple Email Service) domain, but couldn't find the documentation, but I've already checked: Simple Email Service Documentation CloudFormation Resource Types Documentation Do AWS support SES in CloudFormation? 回答1: Unfortunately this is currently not supported, but who knows Re:Invent 2017 is around the corner ,,, Question asked on AWS

How to use Sub and GetAtt functions at the same time in CloudFormation template?

て烟熏妆下的殇ゞ 提交于 2020-03-18 10:28:13
问题 I create CloudFormation yaml template and I need to use !GetAtt "TestLambda.Arn" as part of !Sub function in "AWS::ApiGateway::Method" Integration Uri: ... Type: "AWS::ApiGateway::Method" Properties: RestApiId: Ref: "RestApi" ResourceId: Ref: "TestResource" HttpMethod: "GET" AuthorizationType: "NONE" Integration: Type: "AWS_PROXY" IntegrationHttpMethod: "POST" Uri: !Sub "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/[[place where I want to use !GetAtt "TestLambda.Arn"]]