Questions tagged [amazon-cloudformation]

Amazon Web Services CloudFormation is a JSON- or YAML-based templating system that can be used to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion. You can think of it as 'Infrastructure-as-code'.

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 views

Cannot disable MultiAZ on RDS instance using CloudFormation

I have deployed an instance of a RDS PostgreSQL database with MultiAZ enabled, using CloudFormation. When I try to remove MultiAZ I get the following error from CloudFormation: CloudFormation cannot ...
Maxime Rossini's user avatar
0 votes
1 answer
86 views

Using Ubuntu 22.04 in EC2 via CloudFormation, why does cfn-hup never trigger?

Amazon's documentation includes extensive examples of using cfn-hup to automate updates of instances provisioned via CloudFormation. For one of many examples, see https://docs.aws.amazon.com/...
Nye's user avatar
  • 239
0 votes
1 answer
165 views

AWS Cloudformation template - user pool app client hosted ui login url?

Is there a way to retrieve the login page url for a cognito user pool app client from the cloudformation template? I currently have two projects: one for a spa webapp end one for the aws stack to host ...
fudo's user avatar
  • 141
1 vote
2 answers
1k views

CloudFront distribution can't access S3 bucket for website static assets

The problem I'm trying to deploy an S3 bucket hosting my static website asset and a cloudfront distribution to access it, but the distribution still return a bare xml file for an 'access denied' error:...
fudo's user avatar
  • 141
0 votes
1 answer
41 views

How can I create an ecs service for my deploy

I’m learning CI/CD pipelines and I’ve come up with a question. I have a CloudFormation file that creates some static resources for my app (ECR repository, ECS Cluster and some roles) When creating my ...
Arthur Luiz's user avatar
0 votes
0 answers
47 views

How do I define Suspended Processes in an Autoscaling Group in AWS CloudFormation?

We have a cluster of servers that need specific Elastic IPs, so we don't want the Autoscaling Group to automatically replace them when they fail healthchecks. We have accomplished this by disabling ...
Helios's user avatar
  • 1
1 vote
2 answers
1k views

How to make my ECS Task pull my ECR image

I am trying to create a ECS task and be able to access and pull from ECR, but I am getting an error. How can I resolve this issue? Raw error: Cannotpullcontainererror: pull image manifest has been ...
Arthur Luiz's user avatar
0 votes
0 answers
317 views

What defines the AWS ECS task re-creation timeout

I have an AWS ECS Service with 2 REPLICA tasks in it. When I manually stop one of the tasks, the new one is created in almost exactly 5 minutes. Similar 5 minute timeout happens when one or more tasks ...
Anton Boritskiy's user avatar
0 votes
0 answers
397 views

AWS SAM - cannot create stack with api gateway using stage variable for invoked lambda version

Ok, previous question about using different lambda versions on different stages here: AWS - lambda versions to different gateway stages? Now I'm trying to put it all together using AWS SAM cli but ...
fudo's user avatar
  • 141
0 votes
0 answers
1k views

How to create EKS cluster with VPC CNI addon via CloudFormation?

I create a EKS cluster (1.24) via cloudformation, it works fine without a CNI plugin but fails when I add vpc-cni addon: AddonCNI: Type: 'AWS::EKS::Addon' Properties: AddonName: vpc-...
chingis's user avatar
  • 243
0 votes
0 answers
24 views

Use a common CloudFormation template for CF VPC vs non-CF VPC

I have an application that's been running in one region for years with a manually-configured VPC, but recently I updated the security groups to be managed by CloudFormation. The security group ...
dmaz99's user avatar
  • 1
0 votes
1 answer
360 views

AWS CloudFormation cannot create a db.t2.micro instance in the specified AvailabilityZone

I have a Database and a DBSecurityGroup inside a subnet and a VPC. but whenever I try to launch the stack, I get this error: Database CREATE_FAILED Resource handler returned message: "Cannot ...
André Chrisostomo's user avatar
1 vote
2 answers
266 views

Resource handler returned message: "The CIDR '10.0.1.0/22' is invalid

I'm getting this error while trying to create a VPC with a Subnet in CloudFormation. Subnet CREATE_FAILED Resource handler returned message: "The CIDR '10.0.1.0/22' is invalid. (Service: Ec2, ...
André Chrisostomo's user avatar
0 votes
1 answer
202 views

Cloud formation: when is it safe to delete templates / stacks?

How do I know when it's safe to delete a cloud formation template? Is there a way to list the resources that will be deleted when a template is deleted? It is just the resources listed in the ...
JoeS's user avatar
  • 11
0 votes
0 answers
202 views

Assign elastic ip address to ec2 fleet instances

I am creating multiple EC2 instances using EC2 Fleet service in cloudformation, I want to assign elastic IP addresses to newly created instances from EC2 Fleet, below is my template, can anyone help ...
Darshan Palsamkar's user avatar
0 votes
1 answer
95 views

AWS EC2 instance cannot see another instance on a specific port

I have created two EC2 instances using CloudFormation - one for the Apache web-server, another one for the PostgreSQL DB. For some reason the web-server cannot telnet into the DB instance on port 5432 ...
altern's user avatar
  • 195
0 votes
1 answer
50 views

selecting vCPU harware family while creating VMs on AWS or Azure or Google compute

Do the AWS or Azure or Google compute allow user to select vCPU architecture/Family while creating a VM? Is that possible if I have to specifically create a VM with Xeon family processor and another ...
Franc's user avatar
  • 103
0 votes
1 answer
2k views

AWS CloudFormation - two network interfaces, one with EIP

I'm an AWS newbie. Trying to create an EC2 Instance with two network interfaces, one should be public and the other private. Here is what I've tried in my YAML template: Create a VPC with two subnets ...
Kostya Vasilyev's user avatar
1 vote
1 answer
633 views

CloudFormation - Updating the SecurityGroupIds of an ec2 instance it recreates the instance instead of modifying the same

I created ec2 instance with cloudformation. When I try to update the securitygroup of the instance in the same template , cloudformation recreates the instance instead of modifying the same (Like in ...
Goural's user avatar
  • 25
1 vote
1 answer
140 views

How to apply default policies to cloudformation or terraform in aws?

With terraform or cloudformation, we can apply individual permissions while creating a policy. But how to select default predefined policies like AWSRDSReadyOnlyAccess, like these to the terraform ...
uday kiran's user avatar
0 votes
1 answer
306 views

How to diagnose/fix CloudFormation/autoscaling SSL errors on file download

I have an autoscaling group that was created by AWS CloudFormation. It runs on Amazon Linux 2. Last week, it was working fine. Now, new instances throw a "certificate has expired" error when ...
philolegein's user avatar
1 vote
0 answers
373 views

Reference existing resources in cloud formation

Is there a way to reference an existing resource in cloudformation. I am looking for something similar to terraform’s datasource facility where I can find a resource by tag, etc. and then use a ...
jlo-gmail's user avatar
  • 111
1 vote
1 answer
527 views

How do I use AWS SAM to deploy an AWS API Gateway and AWS Java Lambda including POST caching and disabling logging

How do I deploy a lambda Java function with an API gateway REST interface including caching POST methods using AWS Serverless Application Model?
Tim's user avatar
  • 31.9k
1 vote
1 answer
2k views

How to Apply Egress rules to Default Security Group - AWS

I would like to apply port 443 outbound rule to the 'Default' security group. It worked by creating a dedicated block OutboundRule (which is commented out). Instead of creating a new block, I want to ...
Prime's user avatar
  • 143
0 votes
1 answer
545 views

AWS CloudFormation template - dynamically add multiple instances of the same object

I'm trying to create a CloudFormation template that'll include a ConfigurationAggregator. In order to aggregate data from other regions, the same template file should also define an object (one or ...
Yoav Feuerstein's user avatar
0 votes
1 answer
1k views

AWS CloudFormation template with ConfigRule

I'm new to AWS but already tried looking everywhere for this, and couldn't find a proper answer. My aim is to create a CloudFormation template which forms a new stack, without assuming that AWS Config ...
Yoav Feuerstein's user avatar
3 votes
1 answer
1k views

Configure AWS CloudFront to send custom query params to origin

Is it possible to configure my AWS CloudFront distribution to append to the request a custom query param (e.g a private key) before sending it to the origin? For example, the front end is calling *....
Nadav96's user avatar
  • 131
2 votes
1 answer
2k views

AWS Cloudformation Template error: every Ref object must have a single String value

SNSTopic Type: 'AWS::SNS'...... SNSTopic2 Type: 'AWS::SNS'....... EventRule: Type: 'AWS::Events::Rule' Properties: Name: !Ref EventRuleName Description: State: ...
SadikKhan's user avatar
0 votes
1 answer
2k views

Best way to install cfn-bootstrap utilities on CentOS 8

I'm working on a CentOS 8 based instance/launch configuration in AWS and would like to use cfn-init to manage some of the setup/provisioning steps. However, I'm finding that the provided RPM does not ...
Adam Luchjenbroers's user avatar
1 vote
0 answers
71 views

Autoscaling - lifecylehook implementation

I'm trying to implement my first ASG with a lifecycle hook and I am having this issue: LifecycleHandlerFunction: Encountered unsupported property Role The following resource(s) failed to create: [...
serialp's user avatar
  • 13
0 votes
2 answers
664 views

Modify AWS Lambda function inside CloudFormation stack

I've launched this stack and needed to update it's Lamdba function, I've made some amendments and hit deploy, a new version of function was saved, however Lambda application still refers to the first ...
Mike's user avatar
  • 13
3 votes
1 answer
1k views

CloudFormation: How to get a list of key pairs in a given region

I have a very simple CF template that creates an EC2 instance. The key pair is specified as a parameter. I would like the list of possible key pairs to be populated automatically. Resources: ...
Marcello Romani's user avatar
1 vote
0 answers
27 views

Will deploying an AWS quick start in the same tenant conflict with an existing installation?

I do have only one AWS tenant. There is an application (Atlassian Jira + Confluence) which is running productively in this tenant. Now I want to test a new version of this AWS QuickStart. If I will ...
TorstenS's user avatar
  • 210
2 votes
1 answer
419 views

How to dump AWS resource definitions in CloudFormation format?

I have read through the AWS Documentation and also this summarizing blog article here. The TL;DR is that CloudFormation "import" requires you to meticulously define, down to the last detail, ...
Alex R's user avatar
  • 1,073
2 votes
3 answers
309 views

How to emit IPv6 address of EC2 instance in the ouputs of a cloudformation stack?

I have AWS cloudformation stacks with ec2 instances that are entirely isolated from external traffic. They seldom need to be directly accessed. For cases when they do need to be accessed, I have a ...
GcL's user avatar
  • 121
2 votes
1 answer
1k views

AWS CloudFormation - Creating Layer Version and Function that uses layer

I have a Cloudformation template that currently looks roughly like the following. Resources: MyLayer: Type: AWS::Lambda::LayerVersion Properties: CompatibleRuntimes: - nodejs12....
Randabut's user avatar
1 vote
1 answer
406 views

How can I create a Permission that is limited to just one TargetGroup?

How can I create a Permission (that grants permission to invoke a certain lambda function) that is limited to just one TargetGroup? It might sound simple but the problem has a couple of different ...
Incinerator's user avatar
0 votes
0 answers
3k views

S3 – Connection Aborted / Broken Pipe when uploading to one bucket's presigned URLs, but other buckets are fine

I have an S3 bucket in a Cloudformation stack that holds artifacts. A lambda function in the same stack generates a presigned URL for clients to upload files into the bucket. I already had the code ...
chesnutcase's user avatar
1 vote
1 answer
1k views

"Resource is not in the state changeSetCreateComplete" when deploying to AWS with CloudFormation from Azure DevOps

I'm deploying an application to AWS using the CloudFormation plugin for Azure DevOps. It works really well, and will automatically update things that need changing, leaving other things alone. I've ...
mdarwin's user avatar
  • 121
1 vote
2 answers
1k views

AWS CloudFormation - can I use Sub inside GetAtt?

I'm trying to reference a security group inside a CloudFormation template. the name of the group is !Sub '${EnvironmentName}-SG-Private, where EnvironmentName is a template parameter. However, the ...
mdarwin's user avatar
  • 121
5 votes
1 answer
11k views

Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement

I am running this template in cloud formation to create auto scaling in ubuntu-18.04 machine and it will rollback the all instances automatically that is created by this template and giving such error ...
Shubham Kamboj's user avatar
2 votes
1 answer
653 views

CWAgent Disk Space Alarms

I'm trying to implement an alarm(in Cloudformation) for disk space free using metrics from the Cloudwatch agent and I'm having issues with devices shuffling DeviceID. I encountered this earlier when ...
wronglebowski's user avatar
2 votes
0 answers
533 views

Set CPU options on Elastic Beanstalk environment via Cloud Formation

I have an Elastic Beanstalk worker app that is doing some memory-intensive single-threaded computation. All the available instance types that meet my memory requirements (16 Gb) have 2+ vCPUs, so I ...
Mike Rippon's user avatar
1 vote
1 answer
487 views

What's the proper way to initially deploy a CloudFormation stack for testing?

I'm writing my first CF stacks and I'm running into failed deploys on the first try of course because I don't know the syntax and available parameters yet fully. I am validating my json and the ...
Chris's user avatar
  • 318
2 votes
2 answers
2k views

Create EC2 Instances and Volumes Using CloudFormation

I'm trying to use CloudFormation to deploy two Windows Server 2019 EC2 instances and also attach a new volume to each instance (two instances, two volumes total). I get the following error when I ...
jrd1989's user avatar
  • 688
1 vote
1 answer
250 views

Cloudformation deploy EC2 instance to same IP

I have a application stack that is deployed with cloud formation. It contains two auto scaling groups and one EC2 instance on its own. How do I configure the EC2 instance or cloud formation to ...
charsi's user avatar
  • 167
0 votes
0 answers
142 views

Cloudformation Reuse EBS Volume

I am using cloudformation to manage my infra, and I am facing an issue, if i want to change instance type of an instance, a new instance will be launched with new EBS volume, is there any way to ...
amit singh's user avatar
3 votes
1 answer
2k views

How to create an SSL certificate for an AWS application load balancer without a domain

I am trying to create a Cloudformation stack that can be provisioned by anybody (basically I want to share it either in the marketplace, or make it public in GitHub), which includes a set of EC2 ...
Simon Ernesto Cardenas Zarate's user avatar
0 votes
1 answer
660 views

aws blockchain template received failure signal with uniqueid +failed to create ec2 instance for dev

I am learning about How to Deploy Hyperledger Fabric on AWS with Blockchain Templates. from this tutorial https://medium.com/faun/how-to-deploy-hyperledger-fabric-on-aws-with-blockchain-templates-...
Dora's user avatar
  • 341
1 vote
0 answers
713 views

How to create a Sandbox Environment in AWS?

I am trying to create a Sandbox playground in AWS for Users to practice some resources for 30min, after that, all resources should be deleted and account temporary account should also be deleted. I ...
Manish Goyal's user avatar

1
2 3 4 5 6