All Questions
Tagged with amazon-web-services amazon-cloudformation
201
questions
0
votes
0
answers
36
views
Is there an equivalent to "CloudFormation quick-create" to update the existing stack?
I am using CloudFormation quick-create so that users can easily deploy a stack in their AWS account.
However I may update the stack in the future. I want my users to be able to deploy those changes as ...
0
votes
1
answer
178
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 ...
0
votes
2
answers
356
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 ...
1
vote
2
answers
3k
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:...
0
votes
1
answer
141
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 ...
1
vote
2
answers
3k
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 ...
0
votes
0
answers
463
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 ...
0
votes
0
answers
624
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 ...
0
votes
0
answers
2k
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-...
0
votes
1
answer
608
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 ...
1
vote
2
answers
409
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, ...
0
votes
1
answer
574
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 ...
0
votes
0
answers
252
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 ...
0
votes
1
answer
122
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 ...
0
votes
1
answer
3k
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
...
1
vote
1
answer
172
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 ...
1
vote
0
answers
533
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 ...
1
vote
1
answer
564
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?
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 ...
0
votes
1
answer
690
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 ...
0
votes
1
answer
2k
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 ...
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 *....
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: ...
1
vote
0
answers
76
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:
[...
0
votes
2
answers
968
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 ...
2
votes
1
answer
445
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, ...
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....
1
vote
1
answer
442
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 ...
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 ...
1
vote
2
answers
2k
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 ...
5
votes
1
answer
13k
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 ...
2
votes
1
answer
766
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 ...
2
votes
0
answers
608
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 ...
1
vote
1
answer
626
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 ...
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 ...
1
vote
1
answer
385
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 ...
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 ...
1
vote
0
answers
757
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 ...
1
vote
1
answer
867
views
Discover private DNS of load balancers in Cloudformation
This is a pretty common issue but I am having trouble finding a proper answer to how to go about this.
I have two apps, which will run on EC2s. These apps will be in their separate autoscaling groups,...
2
votes
0
answers
3k
views
Can't delete User Pool Domain when Cognito User Pool already deleted
I deployed a CloudFormation template that sets up a Cognito User Pool and an associated User Pool Domain. As there was a misconfiguration in the template a rollback was triggered. The rollback ...
2
votes
1
answer
241
views
Failed to connect instance with ALB
I'm trying to build a system like this one:
I can't connect to the Instance in private public through ALB. I checked my cloudformation code several times and still couldn't find problem. Please help ...
1
vote
1
answer
148
views
Can't connect to the instance in private subnet through a ALB
I would like to build a simple AWS structure just like the picture. But I failed to connect the instance by using tera term. I checked everything but cannot find anything wrong, can someone please ...
6
votes
1
answer
9k
views
Adding an existing security group CloudFormation EC2 template
Instead of having to set ingress and egress rules, how do I reference existing EC2 security groups in a CloudFormation Template?
Resources:
EC2Instance:
Type: AWS::EC2::Instance
...
0
votes
0
answers
66
views
AWS easy way to provision a new database on an existing RDS (MariaDB) instance
I have a greenfields account, with a bunch of stacks I've built a-top of it. Now, I have no existing EC2 instances, however while "in this state" I want to connect to my existing RDS MariaDB instance ...
0
votes
1
answer
580
views
How to include sticky session in AWS Elastic Beanstalk using Cloud Formation template
As I searched for the stickiness in Elastic Beanstalk I didn't find the way how to include it using AWS Cloud Formation. Can anyone help me to do that thing.
Thanks in advance.
1
vote
1
answer
146
views
AWS cloud formation what should be excluded
We currently have a web UI configured infrastructure that I want to move to cloud formation as it is growing in complexity. We use ECS with multiple docker containers, RDS, load balancers, SNS etc.
...
2
votes
2
answers
399
views
How can I bulk update CloudFormation stacks while keeping the parameters unchanged?
Let's say I have a number of CloudFormation stacks created from the same template. After making changes to the template, I want all stacks to be updated to the new version of the template.
I have ...
1
vote
0
answers
2k
views
How to expose multiple ports on one container in AWS behind ALB
The whole application consists of two servers (RabbitMQ and Tomcat) and a DB running behind ALB. For the time being there will be only one RabbitMQ instance and one Tomcat instance however the set up ...
2
votes
2
answers
5k
views
AWS CloudFormation: Internal Failure. Rollback requested by user
I am creating a stack via the AWS Ruby SDK v3 and it is failing with an internal error. After a long period of time (30-40 minutes) it fails and rolls back with an internal failure. No resources show ...
0
votes
1
answer
497
views
How do I add storage with cloud templating?
I have a CloudFormation template to spin up an EC2 instance.
Parameters:
InstanceType:
Type: String
Description: Instance type for RStudio. Default is t2.micro.
AllowedValues:
- ...