amazon-cloudformation

Amazon Web Services - Tag a S3 bucket with its own name within a CloudFormation

穿精又带淫゛_ 提交于 2019-12-24 17:04:34
问题 I am currently fighting with AWS CloudFormation because I want to tag a bucket with its own name (in order to separate its costs in my Cost Allocation report). When I do "MyBucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { "AccessControl" : "Private", "Tags" : [ { "Key" : "Name", "Value" : { "Ref" : "MyBucket" } } ] } }, the CloudFormation wizard throws the following error: Error Template validation error: Circular dependency between resources: [MyBucket] The real problem is that I

Amazon Web Services - Tag a S3 bucket with its own name within a CloudFormation

风格不统一 提交于 2019-12-24 17:03:54
问题 I am currently fighting with AWS CloudFormation because I want to tag a bucket with its own name (in order to separate its costs in my Cost Allocation report). When I do "MyBucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { "AccessControl" : "Private", "Tags" : [ { "Key" : "Name", "Value" : { "Ref" : "MyBucket" } } ] } }, the CloudFormation wizard throws the following error: Error Template validation error: Circular dependency between resources: [MyBucket] The real problem is that I

Circular dependency in aws stack because of private ip [AWS CloudFormation]

此生再无相见时 提交于 2019-12-24 13:45:10
问题 I am using a cloudformation template to create my EC2 instance. In userdata section i need to run a shell file that i have created in metadata. For that shell file i am passing private ip of the instance as a parameter. To get the private ip i am using this : { "Fn::GetAtt" : [ "ConsoleServer", "PrivateIp" ] }, i ask the wait handler to wait while my user data gets executed but the wait handeler is dependent on the EC2 that i am trying to configure. This is causing cicular dependency but i am

CloudFormation: Block deleting resources

北慕城南 提交于 2019-12-24 09:55:34
问题 A spinoff from this question. Trying to make a cloudformation template safe during changes. Is there a way to actually block the deletion of the role and table? Would adding a policy help? Given the following template excerpt: { ... "Parameters" : { "ShouldCreateTable" : { ... "Description" : "If true then the underlying DynamoDB table will be created with the CloudFormation stack." }, ... }, "Conditions" : { "CreateDynamoTable" : {"Fn::Equals" : [{"Ref" : "ShouldCreateTable"}, "true"]}, ...

Can i update an existing ec2 instance with terraform

不问归期 提交于 2019-12-24 09:07:47
问题 Is it possible to edit an existing resource example: an ec2 instance with the terraform template. Ex: I have a ec2 instance created with aws console, can i add that ec2 instance to add a new security group using the instance id in terraform template. I know this can't be done with cloud formation. Currently I can do this with Ansible, but i don't see a way to do it with terraform or cloudformation 回答1: Yes, you can! However you have to then manage the instance with Terraform. There's no way

Reference an Authorizer definition in an API Gateway path

假如想象 提交于 2019-12-24 04:32:14
问题 I've defined a custom authorizer in my cloudformation template: MyCustomAuthorizer: Type: AWS::ApiGateway::Authorizer Properties: Name: "MyCustomAuthorizer" Type: "TOKEN" AuthorizerUri: "arn:my_lambda" IdentitySource: "method.request.header.Auth" RestApiId: Ref: ApiGatewayApi And I have a Api Gateway API: ApiGatewayApi: Type: AWS::ApiGateway::RestApi Properties: Name: "ApiGatewayApi" Description: "Api gateway REST API" Body: basePath: "/prod" schemes: - "https" paths: /echo: get: consumes: -

AWS Cloudformation - Invocation of Lambda by Rule Event failed

旧时模样 提交于 2019-12-24 04:04:07
问题 I tried to create a template in cloudformation, having a lambda function triggered by one cloudwatch event rule(every 10minutes). In the cloudwatch graph, I can see the invocations but also all failedinvocation. I believe it is an problem of role of the rule but I can't figure out it. Here is my template that you can see in the cloudformation designer. { "AWSTemplateFormatVersion": "2010-09-09", "Metadata": { "AWS::CloudFormation::Designer": { "d1498a15-7d12-4ec9-bba6-3ba163574a10": { "size":

What LaunchConfiguration for Fargate?

 ̄綄美尐妖づ 提交于 2019-12-24 03:34:36
问题 An AutoScalingGroup needs a LaunchConfiguration The problem is that the LaunchConfiguration requires things like ImageId and other parameters which I do not have since I am using containers. How should the LaunchConfiguration be configured when using ECS Fargate? AWS::AutoScaling::AutoScalingGroup https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html AWS::AutoScaling::LaunchConfiguration https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws

What is the proper way to deploy a multi-region CloudFormation stack that includes global resources?

点点圈 提交于 2019-12-24 00:57:04
问题 I have a cloudformation stack template that includes regional resources (lambdas, api, topics, etc.) and global resources (user, policies, route53, cloudfront, dynamodb global tables, etc.) and want to deploy it to multiple region in the same AWS account. I can't directly deploy this stack template in multiple region because global resources will already exist after the first creation. I know I could split everything in two separate stack templates but I would prefer to avoid this and keep

Ec2TagFilters in deployment group for ComputePlatform: Lambda

无人久伴 提交于 2019-12-24 00:56:05
问题 I'm trying to work my way through a Cloud Formation stack creation. The stack includes an AWS::CodeDeploy::Application using CodePlatform: Lambda . It also has an AWS::CodeDeploy::DeploymentGroup . If I run create-stack without the deployment group present, everything seems to work. I can then go into the web UI, and add the deployment group by hand. But if I describe the deployment group in the template, and run create-stack , the create of the deployment group fails, and the stack gets