amazon-cloudformation

How to delete aws ECR repository which contain images through cloudformation?

不问归期 提交于 2021-02-07 07:23:18
问题 How to delete aws ECR repository which contain images through cloudformation? getting below error while deleting it. The repository with name 'test' in registry with id '**********' cannot be deleted because it still contains images 回答1: I was able to do this by first deleting all images in ECR and then going back to CloudFormation and deleting again. Instructions for deleting images are here: https://docs.aws.amazon.com/AmazonECR/latest/userguide/delete_image.html. After I did that, I was

Setting the capability for aws cloudformation template-validate

[亡魂溺海] 提交于 2021-02-06 14:47:38
问题 I am trying to validate a Cloudformation template. The command I am issuing is: ▶ aws cloudformation validate-template --template-body file://template.json The response I am getting, however, is: "CapabilitiesReason": "The following resource(s) require capabilities: [AWS::IAM::Role]", I can't find any way to set the capability unfortunately. How do you set the capability? 回答1: The Capabilities and CapabilitiesReason outputs from validate-template are not errors. They are normal outputs

AWS opswork cloud formation unable to import

ε祈祈猫儿з 提交于 2021-01-29 16:34:57
问题 I am trying to import the cloud formation template for a Opswork VPC as per the guide here: https://aws.amazon.com/blogs/aws/aws-opsworks-in-the-virtual-private-cloud/ I tried importing but it keeps telling me that The following resource types are not supported for resource import: AWS::EC2::VPCGatewayAttachment,AWS::EC2::Route,AWS::EC2::SubnetRouteTableAssociation,AWS::EC2::NetworkAclEntry,AWS::EC2::NetworkAclEntry,AWS::EC2::NetworkAclEntry,AWS::EC2::NetworkAclEntry,AWS::EC2::NetworkAclEntry

Does ECS task definition support volume mapping syntax?

馋奶兔 提交于 2021-01-29 13:14:32
问题 docker-compose spec support volume mapping syntax under services , for example: version: '2' volumes: jenkins_home: external: true services: jenkins: build: context: . args: DOCKER_GID: ${DOCKER_GID} DOCKER_VERSION: ${DOCKER_VERSION} DOCKER_COMPOSE: ${DOCKER_COMPOSE} volumes: - jenkins_home:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock ports: - "8080:8080" Following "AWSTemplateFormatVersion": "2010-09-09" , the corresponding ECS task definition has volume syntax un-readable

How to get the ARN of the load balancer in .ebextensions?

浪尽此生 提交于 2021-01-29 07:48:02
问题 I want to add a cloudwatch alarm to an elastic beanstalk environment using ebextensions. So I created a .ebextensions/cloudwatch-alarms.confg file that looks like the following: Resources: ELBLatencyAlarm: Type: AWS::CloudWatch::Alarm Properties: AlarmDescription: { "Fn::Join" : ["", [{ "Ref" : "AWSEBEnvironmentName" }, ": HIGH ELB latency." ]]} Namespace: AWS/ApplicationELB MetricName: Latency Dimensions: - Name: LoadBalancer Value : "arn:aws:elasticloadbalancing:xx-xxxxxx-1:123456789012

Cloudformation giving error “Requires capabilities : [CAPABILITY_AUTO_EXPAND]”

喜夏-厌秋 提交于 2021-01-29 07:30:52
问题 I am trying to implement Continuous Deployment for my .net core app. When lambda function is invoked, I'am trying to create a cloudformation to spin up the resources. But getting error: Creating Cloud Formation stack: gateway-api-uat-stack Failed to create stack: gateway-api-uat-stack. Reason: Detailed Message: Requires capabilities : [CAPABILITY_AUTO_EXPAND] (Service: AmazonCloudFormation; Status Code: 400; Error Code: InsufficientCapabilitiesException; Request ID: 4779587c-2a17-11e9-a093

Specifying an S3 bucket when deploying a cloudformation template

耗尽温柔 提交于 2021-01-29 05:13:07
问题 I'm trying to deploy a cloudformation template using a command that looks as follows: aws cloudformation deploy \ --stack-name stackname \ --template-file folder/file.yaml \ --s3-bucket bucketname \ --s3-prefix prefix The error that I receive is: An error occurred (ValidationError) when calling the CreateChangeSet operation: S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. For more information

How to supply non-alphanumeric parameter type to AWS CloudFormation

跟風遠走 提交于 2021-01-28 13:52:54
问题 Hi I'm creating a CloudFormation stack from CLI and trying to supply a url parameter. I have given the type as String as I couldn't find anything specific for URL's HERE The problem is, when I give it as Type: String , I get this error: An error occurred (ValidationError) when calling the CreateStack operation: Template format error: Parameter name TELEPHONY_URL is non alphanumeric. This is my parameter json: { "ParameterKey": "TELEPHONY_URL", "ParameterValue": "https://telephony.crm4b2c.com

Error: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances

老子叫甜甜 提交于 2021-01-28 12:01:50
问题 I'm running into an error when creating a spot fleet request through cloudformation. The request is created but I'm getting the error mentioned in the title when the fleet attempts to request an instance. The permissions needed are described in here, however when I try to follow the steps to create the AWSServiceRoleForEC2SpotFleet role I don't have the option to choose "EC2 - Spot Fleet", only EC2 FLeet. What's odd is that when I create the CF stack it actually does create that service

How to change s3 bucket policies with cloudformation?

空扰寡人 提交于 2021-01-28 08:25:11
问题 I would like to be able to change the policies on s3 buckets using cloudformation. However when I attempt to do this I encounter the error: 2017-12-21 18:49:10 UTC TestBucketpolicyAwsS3Bucketpolicy CREATE_FAILED API: s3:PutBucketPolicy Access Denied Here is an example of a cloudformation template that fails due to this issue: { "AWSTemplateFormatVersion": "2010-09-09", "Description": "", "Resources": { "TestBucketpolicyAwsS3Bucketpolicy": { "Type": "AWS::S3::BucketPolicy", "Properties": {