amazon-cloudformation

When do I need to have CAPABILITY_NAMED_IAM

試著忘記壹切 提交于 2019-11-30 20:04:52
I was editing my CloudFormation templates and suddenly AWS tells me I need CAPABILITY_NAMED_IAM . I am curious as to which change triggers this? What is a named IAM resource? Before I already "name" my resources like RoleName: !Sub '${PipelineName}-codebuild' I am not asked to add this capability, I think until I add Parameters: AppName: Type: String Description: Prefix for resources Resources: LambdaRole: Type: AWS::IAM::Role Properties: RoleName: !Ref AppName To my SAM application template. But arent they the "same" except one uses !Ref ? Or maybe some other change triggered this? For

AWS Service Unable To Assume Role

落爺英雄遲暮 提交于 2019-11-30 18:10:39
问题 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

Is there anyway to determine what IAM permissions I actually need for a CloudFormation template?

扶醉桌前 提交于 2019-11-30 17:39:48
问题 Just wondering whats the best practice for determining what permissions I should give for my CloudFormation template? After some time of trying to give the minimal permissions it require, I find that thats really time consuming and error prone. I note that depending on the state of my stack, really new vs some updates vs delete, I will need different permissions. I guess, it should be possible for there to be some parser that given a CloudFormation template can determine the minimum set of

Cloudformation Template format error: Every DeletionPolicy member must be a string

拜拜、爱过 提交于 2019-11-30 17:37:14
Hi I am trying to use the "IF" Function just like mentioned in cloud formation documentation for RDS DeletionPolicy, but for some reason it says that my function does not return a string. AWS Documentation on conditional statements here is the condition: "DeletionPolicy" : { "Fn::If" : [ "CreateProdResources", "Snapshot", "Delete" ]} And the error is the one in the title: Template validation error: Template format error: Every DeletionPolicy member must be a string. Other attempts that didn't work: With a map: "RdsDeletionPolicyMap" :{ "production" : { "policy" : "Snapshot" }, "staging" : {

How do you set SSE-S3 or SSE-KMS encryption on S3 buckets using Cloud Formation Template?

此生再无相见时 提交于 2019-11-30 17:10:14
I'm trying to use a CloudFormation Template to spin up an S3 Bucket in AWS. One of the requirements for this project is that the bucket be encrypted in place. I've been trying to find a way to set that up via CloudFormation Template (I've read all the documentation I can get my hands on for SSE-S3, KMS, CFT and S3s...). But all signs seem to point to it only being available via the console. I'm worried I'm just missing something obvious and I wondered if anyone knew how I could use CloudFormation Template(or at least something automated) to set the default encryption of an S3 Bucket to SSE-S3

How do you set SSE-S3 or SSE-KMS encryption on S3 buckets using Cloud Formation Template?

你。 提交于 2019-11-30 16:27:38
问题 I'm trying to use a CloudFormation Template to spin up an S3 Bucket in AWS. One of the requirements for this project is that the bucket be encrypted in place. I've been trying to find a way to set that up via CloudFormation Template (I've read all the documentation I can get my hands on for SSE-S3, KMS, CFT and S3s...). But all signs seem to point to it only being available via the console. I'm worried I'm just missing something obvious and I wondered if anyone knew how I could use

Passing ARN reference from CloudFormation to Swagger

99封情书 提交于 2019-11-30 15:56:16
We are trying to automate the deployment of AWS lambda and API gateway using Amazon CloudFormation and Swagger. Towards this, we have created a CloudFormation template to create the Lambda and other resources required for APIGateway (including the endpoints). We would like to import the API definitions from an external swagger file so that the same CloudFormation template can be used for multiple lambdas and APIGateways. Is there a way we can refer the ARN of the lambda which has been created by the CloudFormation template in the external swagger file (being referred to in the same

AWS Cloudformation output double quotes in a file using Fn::Join

一曲冷凌霜 提交于 2019-11-30 15:47:33
After much research and frustration, I'm not quite getting the output I'm hoping for. The desired output into a file would be for example "accessKeyId":"UIIUHO]SOMEKEY[SHPIUIUHIU" But what I'm getting is accessKeyId:UIIUHO]SOMEKEY[SHPIUIUHIU Below is the line in an AWS Cloudformation template {"Fn::Join": ["", ["echo \" accessKeyId:", {"Ref": "AccessKeyId"}, "\" >> /home/ubuntu/myfile.json"] ] }, I've tried adding \" with in the echo statement but no quotes are output. Can someone show how to produce the desired output above? huelbois It's a problem of correctly escaping the quotes in fact.

How do I force a CloudFormation stack to update when the parameter is updated?

我的梦境 提交于 2019-11-30 14:24:47
I am running a AWS CloudFormation stack that takes in some parameters and launches EC2 instances along with other AWS resources. The parameters are fed into the user data of the EC2 instance and based on that changes are made dynamically to the web application residing on the EC2 instance. UserData: Fn::Base64: Fn::Join: - "" - - "#!/bin/bash \n" - "sh website-conf/website_mysql_config.sh " - " -c \"" - Ref: "CompanyName" As shown in the example above, CompanyName is one of the many parameters passed to the userdata script. The problem is, when any one or multiple of parameters are updated,

How to send SNS notification after cloud formation is completed?

 ̄綄美尐妖づ 提交于 2019-11-30 12:52:54
Is it possible to send a SNS notification after the CFT completion in AWS ? Is there any way to get the progress of the launching CFT in AWS. When create resources using a CF template there is an Advanced section of the Options menu. From there you can set Notification options using SNS and Topics. When you start the CF process you can also view the status and importantly where the template might have failed. You cannot specify notification ARNs via a CloudFormation template itself. You can specify them if you use the console to create the stack creation. But you cannot use the console to