amazon-cloudformation

AWS Cloudformation: how to manage relationship between configtemplate and environment?

杀马特。学长 韩版系。学妹 提交于 2019-12-08 11:26:33
问题 I have a configtemplate which describes things I want in my environment. For example: OptionSettings: - Namespace: aws:autoscaling:asg OptionName: MinSize Value: 1 I use this in my environment (templatename): appEnvironment: Type: AWS::ElasticBeanstalk::Environment Properties: EnvironmentName: xx ApplicationName: xx TemplateName: !Ref appConfiguration VersionLabel: xx It works well. But now I need to add a new optionsetting which contains the URL of the environment: - Namespace: aws

Docker for AWS and Selenium Grid - Connection refused / No route to host (Host unreachable)

假如想象 提交于 2019-12-08 08:54:16
问题 What I am trying to achieve is a scalable and on-demand test infrastructure using Selenium Grid. I can get everything up and running but what I end up with is this: Here are all the pieces: Docker for AWS (CloudFormation Stack) docker-selenium Docker compose file (below) The "implied" software used are: Docker swarm Stacks Here is what I can accomplish: Create, log into, and ping all hosts & nodes within the stack, following the guidelines here: deploy Docker for AWS Deploy using the compose

How to generate the AWS root account ARN in CloudFormation?

*爱你&永不变心* 提交于 2019-12-08 07:28:52
问题 The situation I am generating a KMS Key in CloudFormation. According to the KMS policy documentation, it is crucial to create a policy where the Principal is the account itself, in order for IAM policies to be able to grant access to the key. The question How can I create the ARN for the account root in CloudFormation? 回答1: The answer { "Fn::Join":[ ":", [ "arn:aws:iam:", { "Ref":"AWS::AccountId" }, "root" ] ] } Why does this work? First, let's examine the line, "Ref":"AWS::AccountId" . This

Cannot output the url of my beanstalk

天涯浪子 提交于 2019-12-08 07:24:32
问题 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

How to set the origin path on an Custom origin using CloudFormation?

不羁岁月 提交于 2019-12-08 07:12:35
问题 I have tried this { "DomainName": "myapi.execute-api.us-east-1.amazonaws.com/dev, "Id": "APIEndPoint", "CustomOriginConfig": { "OriginProtocolPolicy": "https-only", "OriginSSLProtocols":["TLSv1", "TLSv1.1", "TLSv1.2"] } Ref: https://aws.amazon.com/about-aws/whats-new/2014/12/16/amazon-cloudfront-now-allows-directory-path-as-origin-name/. But I am getting the below error The parameter origin name must be a domain name. (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidArgument;

Why does GetAttr not work on cloudformation template parameters?

余生颓废 提交于 2019-12-08 07:12:29
问题 Have a collection of cloudformation templates in a parent-child relationship and want to pass an AWS::IAM::Role into the parameters of a child stack and use GetAttr to get the Arn. This fails validation because can only call GetAttr on resources, not on parameters. Anyone know/guess why this is designed in this way? It's not a problem as it can be worked around by just passing the Arn into the stack, I'm just curious really 回答1: What Fn::GetAttr and Parameters are trying to do in AWS

AWS Cloudformation Link API Key to API Gateway

久未见 提交于 2019-12-08 07:06:46
问题 I have the following Cloudformation template I am trying to deploy via SAM. This template correctly creates the DynamoDB table, an API Key, a Lambda function and the API Gateway, but I cannot figure out what I need to specify in the template to associate the API KEY with the API Gateway. I have found plenty of snippets showing partial examples, but I am struggling to piece it all together. Thank you in advance, Denny AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::Serverless-2016-10-31

How to integrate, by CloudFormation, Api Gateway with Step Functions

僤鯓⒐⒋嵵緔 提交于 2019-12-08 04:32:14
问题 I'm creating a CloudFormation template for the platform I'm working on. I need to integrate Api Gateway and Step Functions, to make one of my step functions be executed by a call to a Api Gateway Method. I'm not finding any documentation on this. I struggled to find the Integration/Uri, that should be arn:aws:apigateway:${region}:states:action/StartExecution but now I'm not sure on what to write in my RequestTemplates. I suppose that I could actually leave it empty, to make it act like a

Why does GetAttr not work on cloudformation template parameters?

南楼画角 提交于 2019-12-08 02:36:28
Have a collection of cloudformation templates in a parent-child relationship and want to pass an AWS::IAM::Role into the parameters of a child stack and use GetAttr to get the Arn. This fails validation because can only call GetAttr on resources, not on parameters. Anyone know/guess why this is designed in this way? It's not a problem as it can be worked around by just passing the Arn into the stack, I'm just curious really What Fn::GetAttr and Parameters are trying to do in AWS CloudFormation is fundamentally different. As per AWS docs: The intrinsic function Fn::GetAtt returns the value of

How pass output values between aws nested stacks in serverless?

心不动则不痛 提交于 2019-12-08 02:04:16
问题 Here is readme about serverless-plugin-nested-stacks plugin. It makes possible to include nested stacks into main one. But how to pass values between stacks? For example I create a resouce in one nested stack - how to path it arn to another stack (nested or main one)? 回答1: First you will need to export the resources from the corresponding nested stack like this: AWSTemplateFormatVersion: '2010-09-09' Parameters: ... Resources: ... Outputs: o1: Description: ... Value: <your_resource_arn>