amazon-cloudformation

Terraform: Write a CloudFormation Template to disk

左心房为你撑大大i 提交于 2019-12-11 14:37:32
问题 We are using Terraform along with a vendor supplied CloudFormation template. It is all working except for when there are changes to the template. Terraform does not show you what will change as it's all contained within the template. I was wondering if Terraform could write out the rendered CloudFormation template to disk where we could (in theory) use AWS native CloudFormation to create a change set to attempt to see the changes. Any ideas if Terraform can write this out? 回答1: Terraform

How to protect some files/objects in public bucket?

感情迁移 提交于 2019-12-11 14:26:33
问题 I would like to create a public read aws s3 bucket with some files read restricted by a IAM role. First of all: I using amplify cli for deploying my «static» website. The website is a react app This app have public pages/react components and a admin area I would like to restrict admin area/admin pages/admin react components with a aws IAM role More details: The react app is very big so I splited components using asyncComponent feature like const Dashboard = asyncComponent(() => import('.

cat EOF issues with indentation [duplicate]

江枫思渺然 提交于 2019-12-11 14:17:22
问题 This question already has answers here : here-document gives 'unexpected end of file' error (5 answers) Multi-line string with extra space (preserved indentation) (7 answers) Closed 8 months ago . NOTE: If anyone feel this question has been answered before please paste your answer below otherwise please don't interfere with people trying to help someone who needs help. Thanks I am not sure why it is such an hassle trying to cat content to file when the content is indented Can anyone point to

Can I use CloudFormation StackSets to deploy to multiple regions in my own account?

点点圈 提交于 2019-12-11 09:38:08
问题 I have a simple CloudFormation stack that I want to deploy to all regions in my account so I don't have to manually go into each region to deploy the stack, or create a script that does that with the CLI. I tried doing this with StackSets: I indicated that the account I want to deploy to is my own account number. Then I selected all the regions, and tried to deploy. Unfortunately, it didn't work, saying: Account 1234567867867 should have 'AWSCloudFormationStackSetExecutionRole' role with

AWS CodePipeline: Get CloudFormation outputs in CodeBuild

冷暖自知 提交于 2019-12-11 08:53:30
问题 I'm learning some DevOps techniques using AWS CodePipeline (Cloudformation and CodeBuild). My (simplified) pipeline is this: Push to github repo triggers pipeline CloudFormation builds/updates backend infrastructure CodeBuild does some additional work At the moment, CloudFormation outputs the following: Outputs: RestApiId: Value: !Ref ApiGateway Description: 'API Id' Question: How can I get the ApiGateway ID in CloudBuild? 回答1: According to: https://docs.aws.amazon.com/AWSCloudFormation

Automate the Cloudformation template Deployment

故事扮演 提交于 2019-12-11 07:49:43
问题 I am currently using Cloudformation templates to provision resources in AWS. Currently, if I need to create a VPC and Security groups, First I will create VPC from a template and again I will launch another template for security group where I manually input the VPC ID. Now, I need to automate this manual process in Cloudformation. How can I do this? Can I use AWS Developer tools or other automation tools? 回答1: Short answer You need to follow a practice of outputting the ARNs/Names of any AWS

CloudFormation Template is invalid: Template format error: Every Outputs member must contain a Value object

混江龙づ霸主 提交于 2019-12-11 07:36:38
问题 I have an AWS IoT Chat Application whose UI is on React and to do the AWS configuration I have a setup which is executed using "serverless deploy" command. When executed, a serverless.yml gets executed, and it breaks at a point where it throws an error as CloudFormation Template is invalid: Template format error: Every Outputs member must contain a Value object the serverless.yml code is given below: resources: Resources: UserTable: Type: "AWS::DynamoDB::Table" Properties: TableName:

CloudFormation Template (JSON) for EC2 with VPC, Subnet & Security Group Choices

五迷三道 提交于 2019-12-11 06:14:58
问题 I'm trying to setup a CloudFormation template in JSON that stands up an EC2 instance, just getting started but having issues with selecting VPC and subnet. In the end this will be a template used across multiple accounts each with multiple VCPs and subnets. There is no default VPC in any of the accounts. I'd like to have the template prompt for VPC then iterate valid subnets based on the VPC. I've been working with this Amazon blog post: Looking up information on AWS CloudFormation stack

Reference Parameter Value in UserData in AWS Cloudformation

前提是你 提交于 2019-12-11 05:57:38
问题 I have this under parameter section , Parameters: PlatformSelect: Description: Cockpit platform Select. Type: String Default: qa-1 AllowedValues: [qa-1, qa-2, staging, production] I need to reference this value in my UserData. I’m using Mappings in between. Mappings: bootstrap: ubuntu: print: echo ${PlatformSelect} >>test.txt Resources: EC2Instance: Type: AWS::EC2::Instance Properties: InstanceType: !Ref ‘InstanceType’ KeyName: !Ref ‘KeyName’ Tags: - Key: Name Value: Test UserData: Fn::Base64

Does AWS CDK create default stack name in CloudFormation?

人盡茶涼 提交于 2019-12-11 05:57:23
问题 Using CloudFormation template, CloudFormation service ask for a stack name( AWS::StackName ) before applying the template. Using AWS CDK, we run cdk synth to create cfn template & cdk deploy to deploy services based on the template. Does AWS CDK create default stack name in Cloudformation service? after running cdk deploy 回答1: In order to create a stack you have to instantiate an object for that stack. When you do, you pass the stack name as a parameter. Example in Python: class MyStackClass: