amazon-cloudformation

Required Cloudformation Script for Blue/Green deployment on ECS

孤街醉人 提交于 2019-12-07 21:08:02
问题 I am trying to write a cloud-formation template for AWS ECS with blue green deployment support . This blue-green feature was added recently by AWS in ECS and couldn't find any reference for updating it in cloud-formation template. They have given documentation on, how to do it through UI but not through cloud-formation. I guess, AWS might not updated their cloud-formation documentation as it is a new feature. Any help to find the documentation would be appreciated. Thanking you in advance.

Can you create Usage Plan with Cloud Formation?

馋奶兔 提交于 2019-12-07 19:57:55
问题 just like in the title. I can deploy stuff on AWS using only Cloud Formation. Now I try to secure my API Gateway with API Keys and looks like I need a Usage Plan for it. It doesn't seem to be covered by the documentation right here: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html Have any of you had a similar problem and if yes, how did you solved it? 回答1: AWS has today released the ability to create AWS::ApiGateway::UsagePlan using cloud

Change IAM Role for a Lambda in a CloudFormation template in a CodeStar project?

纵饮孤独 提交于 2019-12-07 13:23:24
问题 How can I change the IAM Role for a Lambda function in an CloudFormation template of an AWS CodeStar project? I have created a AWS CodeStar project (web service, Lambda based, Node.js). By default, AWS CodeStar generates the following CloudFormation: AWSTemplateFormatVersion: 2010-09-09 Transform: - AWS::Serverless-2016-10-31 - AWS::CodeStar Parameters: ProjectId: Type: String Description: AWS CodeStar projectID used to associate new resources to team members Resources: HelloWorld: Type: AWS:

How to obtain all EC2 instance IDs from AutoScaling?

≡放荡痞女 提交于 2019-12-07 10:58:25
问题 So I have an AWS CloudFormation template with 3 different instance 'types' (Server, Agent, Relay) I'm using AutoScaling to dynamically launch X number of instances of a type. My problem is that I need all of the IPs of these servers from Outputs of the template, preferably sorted into sections. i.e. Servers: x.x.x.x y.y.y.y Relays: z.z.z.z Agents: a.a.a.a How do I get just the instance Ids from the Outputs? (I can get the IPs from the IDs) Attached Template: { "AWSTemplateFormatVersion" :

could not determine a constructor for the tag '!GetAtt' [closed]

爷,独闯天下 提交于 2019-12-07 09:00:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 months ago . I am writing a CFT for a website hosted on S3 - The YML file passes template-validate with no issues however the build agent returns the following error: yaml.constructor.ConstructorError: could not determine a constructor for the tag '!GetAtt' Outputs: WebsiteURL: Value: !GetAtt RootBucket.WebsiteURL

Cannot output the url of my beanstalk

天涯浪子 提交于 2019-12-07 08:26:27
I am having a problem with outputting beanstalk url in my cloudformation: Here is my outputcode: Outputs: ELB: Description: 'The environment name' Value: !GetAtt BeansEnvironmentUI.EndpointURL But what I see in the output in the url of loadbalancer: awseb-e-k-AWSEBLoa-NP5ZWGTVP2FV-1714896666.us-east-1.elb.amazonaws.com This is not what I want. When I look at the beanstalk console itself I see the following: myenv.prejvvvgq2.us-east-1.elasticbeanstalk.com which is what I am looking for. So here is the format of the above url: [nameOftheEnvironment].

How to automate EBS encryption with Elastic Beanstalk

怎甘沉沦 提交于 2019-12-07 07:25:18
问题 I am looking to encrypt my root EBS volumes for new EC2 environments that I create. I know that I can do this from the AWS console and from CloudFormation, but would like to be able to do so via an Elastic Beanstalk config file. I have tried by setting the EBS volume in the launch configuration, however this only creates additional volumes from the root volume: Type: AWS::AutoScaling::LaunchConfiguration Properties: BlockDeviceMappings: [ DeviceName: "/dev/sdf1", Ebs: { Encrypted: true,

Is there a way to create AWS Dashboard using cloudformation or AWS CLI

牧云@^-^@ 提交于 2019-12-07 06:30:33
问题 I wanted to create an AWS Dashboard using cloudformation but did find a way. Guess AWS has not yet added support for that. As an alternative is it possible to create that using AWS CLI 回答1: AWS just announced support for this. https://aws.amazon.com/blogs/aws/new-api-cloudformation-support-for-amazon-cloudwatch-dashboards/ CloudFormation documentation is also available: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-dashboard.html 回答2: If I'm correct your

Issue with creating a Postgres RDS in Cloudformation Template

泄露秘密 提交于 2019-12-07 05:18:42
问题 I have the following YML in my cloud formation template: MyDB: Type: "AWS::RDS::DBInstance" Properties: DBInstanceIdentifier: !Ref DBInstanceName DBName: !Ref DBName AllocatedStorage: "100" DBInstanceClass: !Ref DBInstanceType Engine: "postgres" EngineVersion: "9.6.2" MasterUsername: !Ref DBUsername MasterUserPassword: !Ref DBPassword PubliclyAccessible: false StorageType: standard VPCSecurityGroups: - !Ref PrivateAccess MultiAZ: true DeletionPolicy: "Snapshot" It is failing due to "The DB

Listing more than 100 stacks using boto3

强颜欢笑 提交于 2019-12-07 05:06:11
问题 We need to list all the stacks that are in CREATE_COMPLETE state. In our AWS account we have >400 such stacks. We have the following code written for this: stack_session = session.client('cloudformation') list_stacks = stack_session.list_stacks(StackStatusFilter=['CREATE_COMPLETE']) However this lists only the first 100 stacks. We want to know how we can get all the stacks? We are using the python boto3 library. 回答1: I got this working using pagination. The code I wrote is below: stack