amazon-cloudformation

How to configure CloudFront using CloudFormation to set the 'Headers' property in 'ForwardedValues' to 'all'?

こ雲淡風輕ζ 提交于 2019-12-31 01:57:00
问题 I am setting up CloudFront using CloudFormation, but I need to configure the Headers property of the ForwardedValues property. It should be setup in such a way that all headers are forwarded. I can't find how to do so on neither the ForwardedValues documentation page nor the page that is linked regarding Caching Content Based on Request Headers. This is the CloudFormation 'path' to the Header property: someCloudFrontDistributionName: Type: AWS::CloudFront::Distribution Properties:

Create AMI image as part of a cloudformation stack

假装没事ソ 提交于 2019-12-28 12:01:41
问题 I want to create an EC2 cloudformation stack which basically can be described in the following steps: 1.- Launch instance 2.- Provision the instance 3.- Stop the instance and create an AMI image out of it 4.- Create an autoscaling group with the created AMI image as source to launch new instances. Basically I can do 1 and 2 in one cloudformation template and 4 in a second template. What I don't seem able to do is to create an AMI image from an instance inside a cloudformation template, which

How do I get a pre-signed url for an API Gateway in Cloudformation using Boto3?

寵の児 提交于 2019-12-25 12:56:30
问题 I want to make a call to an API Gateway maintained in Cloudformation. I have the Cloudformation stack name ( CF_STACK_NAME ), the API Gateway resource name ( API_GATEWAY_NAME ), and Cloudformation name of the IAM Role I need to assume ( API_ROLE_NAME ). I can get to my Cloudformation stack via, cf_client = boto3.client('cloudformation') api_role_resource = cf_client.describe_stack_resource( StackName=CF_STACK_NAME, LogicalResourceId=API_ROLE_NAME ) api_resource = cf_client.describe_stack

Create an RDS Opsworks Layer by a Cloudformation template

好久不见. 提交于 2019-12-25 08:27:19
问题 I'm making a CloudFormation template that creates an opsworks stack, layers and few applications. Within my layers, I have opsworks ones and RDS ones. In the AWS documentation, there is only how to create Opsworks::Layer but I don't know how to make an Amazon RDS service layer: { "Type": "AWS::OpsWorks::Layer", "Properties": { "Attributes" : { String:String }, "AutoAssignElasticIps" : Boolean, "AutoAssignPublicIps" : Boolean, "CustomInstanceProfileArn" : String, "CustomJson" : JSON object,

Cloudformation template to create a role for SQS

我的未来我决定 提交于 2019-12-25 08:00:09
问题 I am trying to create a role with embedded policy using cloudformation template : { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "SQSRole": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version" : "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "sqs.amazonaws.com" ] }, "Action": [ "SQS:SendMessage", "SQS:ReceiveMessage", "SQS:DeleteMessage", "SQS:GetQueueUrl" ] } ] }, "Path": "/" } }, "RootInstanceProfile": { "Type": "AWS:

Creating SQL RDS instance in CloudFormation

大兔子大兔子 提交于 2019-12-25 01:45:20
问题 I can't find any examples on creating a SQL Server RDS instance in CloudFormation, so I took an educated guess using an example for MySQL. Here's what I came up with: { "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "DBInstance" : { "Type": "AWS::RDS::DBInstance", "Properties": { "DBInstanceIdentifier" : "test-db", "Engine" : "sqlserver-ex", "Port" : "1433", "DBInstanceClass" : "db.t1.micro", "AllocatedStorage" : "30", "MasterUsername" : "sa", "MasterUserPassword" : "password" } }

How to make a whole object in CloudFormation templates optional?

喜你入骨 提交于 2019-12-25 01:29:52
问题 I'm making a Lambda function via CloudFormation template, and I'd like to make it optional to enter the information for the VpcConfig property. I've found articles like this one on how to make parameters optional: https://cloudonaut.io/optional-parameter-in-cloudformation/ That was very helpful for finding syntax to make properties with single values optional (like a single string value). But what I need to figure out is how to make the whole VpcConfig OBJECT optional. It's a little tricky,

CodeDeploy: The specified load balancer does not exist

雨燕双飞 提交于 2019-12-25 00:17:56
问题 I'm trying to associate an ELB (NLB actually) with a CodeDeploymentGroup, using the prescribed format of ElbInfoList. This is in CloudFormation. CodeDeploy won't have it. During deploy, it says, > *The specified load balancer does not exist. for activityId="5" of activityType={Name: > ExecuteCentralizedCommandOnInstanceActivity.runCentralizedCommand,Version: > 1.00}* My deployment group looks like so: "CodeDeploymentGroup" : { "Type" : "AWS::CodeDeploy::DeploymentGroup", … "Properties" : {…

Lambda permissions error when setup using CloudFormation and API Gateway proxy

梦想的初衷 提交于 2019-12-24 20:49:32
问题 I am trying to write a cloudformation script that would create a lambda function and hook it up to the API Gateway proxy resource. Stack creation works, but there is something wrong with permissions or integration config, when I test the endpoint, I keep getting Mon Feb 12 06:45:28 UTC 2018 : Endpoint response body before transformations: Unable to determine service/operation name to be authorized Mon Feb 12 06:45:28 UTC 2018 : Endpoint response headers: {Connection=keep-alive, x-amzn

Circular Dependency when using AWSEBAutoScalingGroup with CreationPolicy

倾然丶 夕夏残阳落幕 提交于 2019-12-24 18:33:49
问题 I'm trying to set up my Elastic Beanstalk environment to have an auto scaling group with a creation and update policy that waits for a signal from any new instances. Unfortunately I'm having issues getting this to work, and I believe it's because of a circular dependency. I have one config file in .ebextensions with the auto scaling configuration: Resources: AWSEBAutoScalingGroup: Type: AWS::AutoScaling::AutoScalingGroup Properties: HealthCheckType: ELB HealthCheckGracePeriod: 300