All Questions

Filter by
Sorted by
Tagged with
31 votes
4 answers
20k views

CloudFormation Cross-Region Reference

When you are running multiple CloudFormation stacks within the same region, you are able to share references across stacks using CloudFormation Outputs However, outputs cannot be used for cross ...
Reed Hermes's user avatar
  • 2,136
21 votes
5 answers
30k views

AWS Cloudformation- How to do string Uppercase or lowercase in json/yaml template

I am working on AWS CloudFormation and I created one template in which I asked user to select Environment. On the basis of selected value I created the resources. User have to select between DEV, QA, ...
Vikramsinh Gaikwad's user avatar
14 votes
2 answers
8k views

AWS CDK: Is there a way to create database schema using CDK?

I have created a RDS Aurora Postgres Database Cluster and Database Instance through CDK (using java as a language). Now I am trying to achieve creating a database schema through CDK. I tried but did ...
horizon7's user avatar
  • 1,203
13 votes
2 answers
6k views

Change the Default TimeOut of AWS Custom Resource

Can we change the default timeout of AWS CustomResource, as its default timeout is 1 hour and the job that will return an HTTP response to the custom resource is taking approximately 2 hours to send ...
priyojit Pal's user avatar
10 votes
5 answers
8k views

CloudWatch resource access policy error while creating Amazon Elasticsearch Service via Cloud Formation

I am trying to create an elastic search domain with enabled LogPublishingOptions. While enabling LogPublishingOptions ES says it does not sufficient permissions to create a LogStream on Cloudwatch. I ...
Milind Dalvi's user avatar
7 votes
4 answers
12k views

Can we dynamically create Keypair through AWS Cloudformation and copy the .PEM file to EC2 Linux instance

My requirement is to create an EC2 instance which will have the Keypair created dynamically from the same Cloudformation template.As of now,I am creating the KeyPair from AWS console and assigning it ...
Amit Chandra's user avatar
6 votes
2 answers
11k views

How can I reference an existing role in my new CloudFormation template?

In my AWS account, I am building a new Cloudformation template that creates new policies, and I want to attach those to a few existing roles in the account. Here is how I have been trying to ...
lorena's user avatar
  • 394
6 votes
1 answer
9k views

Delete AWS Cloud formation stack with resources created by it

Based on this page I can do: aws cloudformation delete-stack \ --stack-name my-stack It says I can attach the command: [--retain-resources <value>] Does that mean that if I don't specify ...
ElKePoN's user avatar
  • 912
5 votes
4 answers
6k views

how to reference existing ELB DNSName in Cloudformation template

we have Cloudformation template through which we deploy the infra resources for our product. and below are the AWS component which are creating through CF templates: 1. Networking Components. Like VPC,...
chitender kumar's user avatar
5 votes
2 answers
2k views

How to Attach Elastic IP to NatGateway via Cloud Formation

I am trying to learn Aws cloud Formation , where I am trying to create VPC as shown in picture. it contains three public subnets, private subnets , natgateway and Internetgateway with public and ...
Jordan's user avatar
  • 195
5 votes
0 answers
937 views

Extract VPC endpoint IP addresses in AWS CloudFormation

I am creating a CloudFormation template to create the necessary infrastructure to host static websites using S3 bucket. The template includes creating a VPC endpoint of type Interface and then ...
Karel Krýda's user avatar
4 votes
2 answers
3k views

Cloud Formation to add multiple S3 triggers to same S3 bucket in LambdaConfigurations

My requirement is to trigger Lambda_Function_1 if input.txt file creates in S3 bucket and trigger Lambda_Function_2 if output.txt file creates in same S3 bucket. The below cfn is not working, but it ...
Kiran Annamaneni's user avatar
4 votes
2 answers
1k views

How automate the logo for aws hosted UI

I have seen commands like this to setup a custom logo aws cognito-idp set-ui-customization --user-pool-id us-XX-X_XXX --client-id ALL --css "xxx" --region us-XX-X_XXX --image-file logo.png But I am ...
jam's user avatar
  • 519
4 votes
1 answer
530 views

Cross account Cloudformation macro

I am trying to create a cross account macro which will will be used in Cloudformation. According to the doc - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html we ...
sukhwant prafullit's user avatar
3 votes
2 answers
820 views

CloudFormation Elastic load balancer listener circular dependency with listener certificate

I have a cloudformation template that is trying to create an application load balancer listener and it also attempts to create a listener certificate. The issue is both resources reference each other. ...
Cavanex's user avatar
  • 103
3 votes
1 answer
2k views

I need help understanding what is AwsCustomResource.policy in cdk?

I am using CDK's AwsCustomResource to create an S3 object. I fail to understand AwsCustomResource.policy. The docs say: policy (mandatory): The policy to apply to the resource. and about role: ...
Roy Ca's user avatar
  • 473
3 votes
1 answer
701 views

Error in creating SQS Queue and its access policy through Cloudformation

I am trying to create an SQS queue and its associated access policy using cloudformation. Tried a few iterations but it keeps giving me this error: Value of property Queues must be of type List of ...
abhinav singh's user avatar
3 votes
1 answer
1k views

Selecting multiple values from DropDownList in CloudFormation Template

Cloudformation expert, Is it possible to be able to select multiple values from a dropdownlist in Cloudformation Template? I tried something like this but it didn't work pTypeOfAccountNeeded: ...
Abby's user avatar
  • 67
3 votes
1 answer
2k views

How to force complete recreation of custom resource during stack updates?

I have a CF template with a custom resource (backed by a lambda function). I would like this custom resource to be deleted and the newly created when I update my stack. How can I achieve this? To ...
lexicore's user avatar
  • 43.3k
3 votes
0 answers
2k views

AWS Cloudformation Stack stuck in "UPDATE_ROLLBACK_IN_PROGRESS" status

It has been 10 days as this stack stuck in current state. The Delete button is not available. It happened after an error occurred in a nested stack and that stack was deleted separately from the ...
0bj3ct's user avatar
  • 1,420
2 votes
2 answers
5k views

Getting Fn::GetAtt error in the AWS SAM template

I have declared the SNS topic and Subscription like below in my AWS Serverless Application Model template :- MyTopic: Type: AWS::SNS::Topic Properties: DisplayName: !Sub 'test-${...
vinod827's user avatar
  • 1,384
2 votes
2 answers
671 views

replicate existing AWS resource with CloudFormation

I have AWS resources that I manually created in the browser Now I want to have the ability to create equivalent resources using CloudFormation. Is there a tool that turns an already existing AWS ...
gota's user avatar
  • 2,509
2 votes
1 answer
311 views

AWS CloudFormation VPC CIDR assign to Security Group [closed]

when I select VPC network, how can I assign the VPC's CIDR to Security Groups? Parameters: VpcId: Type: 'AWS::EC2::VPC::Id' Description: VpcId of your existing Virtual Private Cloud (VPC) ...
Mr. Tux's user avatar
  • 145
2 votes
1 answer
2k views

How to export an existing CodePipeline to CloudFormation template

This is more of a lack of understanding on my part but I cannot seem to debug this. I have created an codepipeline which runs terraform apply ( which internally creates the aws infrastructure for me )....
adit modi's user avatar
2 votes
1 answer
2k views

AWS CDK - How to use "placeholder" token with Low Level cfn constructs

I am using CDK (in typescript) to define an AWS Timestream DB and a table inside it. I want to allow AWS to set the name of the database (and avoid hardcoding it). The problem is how to reference that ...
Mike P.'s user avatar
  • 198
2 votes
1 answer
1k views

How to add conditions in Parameters section in AWS CloudFormation?

So what I am trying to do is, I defined a Parameter called EnvType with allowed values test or production. What should happen is when the user selects one of these environments test or production, ...
user avatar
2 votes
2 answers
3k views

User: batch.amazonaws.com is not authorized to perform: sts:AssumeRole on resource

I've been trying to create some infrastructure that includes bunch of services like EC2, ECS, S3 and Batch (few more). Everything seems to be fine, till it reaches the step to build the batch process. ...
Xonshiz's user avatar
  • 1,337
2 votes
1 answer
1k views

CloudFormation Custom Resource update with the same parameters

Is there a way to trigger a Custom Resource lambda without updating parameters? When I update stack without changes it doesn't detect the resource as to be modified. The only solution I'm thinking of ...
Yann's user avatar
  • 2,502
2 votes
1 answer
323 views

How to make two EC2 instance (installed Elasticsearch created by AMI) as multi-node using cloudformation template?

I need to create two Ec2 instances using AMI and make it as multi-node using CloudFormation template. The AMI installed the elasticsearch in it. I need to make one a master node and another one a data ...
SST's user avatar
  • 2,094
2 votes
1 answer
408 views

How to Display a Resource From a Custom Lambda

I have a custom CloudFormation resource that creates an S3 bucket if it doesn't exist. Here is the code: S3CustomResource: Type: Custom::S3CustomResource Properties: ServiceToken: !GetAtt ...
gumluvinisgoodluvin's user avatar
2 votes
1 answer
1k views

exporting outputs in cloudformation using custom resources with lambda

I ran a CFN template using custom resources to export route53 private hosted zone name. I was able to export the hostedzonename as I wanted but I can not import this hostedzonename into another stack. ...
eshmet chishik's user avatar
2 votes
1 answer
1k views

CloudFormation Key Value pair in Environment Variables

I am fairly new to AWS so question I am asking here may sound like very basic. I am trying to define cloudformation template and I have requirement that I need to tag each resources I create. I can ...
Nakul Detroja's user avatar
2 votes
2 answers
6k views

Error while creating custom resource trigger for lambda

I created a lambda via ts file with the following specifications: description: 'Lambda request handler to automate the DDL commands', name: LAMBDA_NAME, timeout: Duration....
Nitika's user avatar
  • 165
2 votes
0 answers
189 views

How to disable rollback for stackset in cloudformation

I know that we can disable rollback for stack failure for normal cloudformation stack. Is there anyway we can setup that for the stackset created by the cloudforamtion. Tried with failure tolerance, ...
phil J's user avatar
  • 21
2 votes
1 answer
277 views

Pass tags as parameters in clouldformation

I have created a simple template which i am going to use to create s3 buckets. My template looks like this. Parameters: Environment: Type: String Default: prod AllowedPattern: '[a-z\-]+' ...
Unknowntiou's user avatar
2 votes
1 answer
677 views

Cloudformation - Route table has a conflicting association with the gateway

I'm trying to deploy EC2 instance using CloudFormation. It's giving the following error when I try to execute the stack. Route table has a conflicting association with the gateway igw-...
Markus's user avatar
  • 389
2 votes
1 answer
132 views

AWS ECS TaskDefinition autoscaling

I'm have an issue hopping you can help. I wanted to make aws ecs task but I cant find a way to auto-scale it its stuck with 256CPU and 512Memory, and I dont want to hard code it (2G memory) because I ...
Yazan Ahmed's user avatar
2 votes
0 answers
491 views

AWS cloudFormation Template for QuickSight

I am trying to make the cloudFormation template for the following architecture/process/data pipeline: DynamoDB has some data which is brought into Glue database using Glue crawler after the data is ...
Dahab Shakil's user avatar
2 votes
1 answer
982 views

not able to download bootstrap file from S3 when using in Cloudformation

we are trying to deploy a EC2 stack which has LaunchConfig, AutoScaling group and IAM role. in Launch config we have configured to execute the bash script with help of "AWS::CloudFormation::Init". ...
chitender kumar's user avatar
1 vote
1 answer
2k views

Order the parameters as mentioned in the template

When you create stacks in the console, the console lists input parameters in alphabetical order by their logical IDs. There is way to customize the order using Interface. https://docs.aws.amazon.com/...
shantanuo's user avatar
  • 32k
1 vote
2 answers
1k views

Translate ECS service to cloudformation

I am trying to translate a manually created service to a cloudformation template but I keep getting errors. Task definition is already created with UI because it needs some specific roles This ...
LuisEnMarroquin's user avatar
1 vote
3 answers
527 views

YAML code to create multiple VPC using count in AWS cloudformation

I'm new to CloudFormation and want to create a template using YAML. I need to figure out is there any way we can create multiple VPCs using UserInput. As of now, I've used the following code: ...
Shritej Murmadkar's user avatar
1 vote
2 answers
4k views

Cloudformation template with multiple resources

I have a fairly simple cloudformation template. I am trying to learn about them. I created one where I am trying to create 2 dyanmo table when I deploy the stack. But only one table gets created. Not ...
curiousengineer's user avatar
1 vote
1 answer
724 views

Bring existing AWS secrets into Cloud Formation stack

Initially I created secrets outside of Cloud Formation using Custom Resource. Now I want to migrate those existing secrets to existing Cloud Formation Stack without creating a new one. Is there a way ...
curious_coder's user avatar
1 vote
1 answer
100 views

Lambda HTTP request to presigned S3 URL timing out

I have a Custom Lambda resource that inits my DB and then is supposed make the call to the presigned S3 url when done. It's initing the DB correctly but is timing out when making the call to S3. My ...
Shane's user avatar
  • 13
1 vote
1 answer
4k views

Create RDS DB User CloudFormation

As CloudFormation does not natively support creating a DB User for an RDS Database, I am looking for ways to do this via CustomResource. However, even if I write a CustomResource backed by a Lambda ...
Nitin Rastogi's user avatar
1 vote
1 answer
1k views

Error: Value of property LoadBalancerAttributes must be of type List

Error: Value of property LoadBalancerAttributes must be of type List I followed cloud formation documentation and set the Attributes but still I am getting error Can anyone know the issue and where ...
Saikumar Nandam's user avatar
1 vote
2 answers
2k views

Amazon Connect and CloudFormation

I found an interesting github link for automating the way to import the AWS connect flow from CloudFormation: https://github.com/iann0036/amazon-connect-cfn/blob/master/example_stack.yaml It is ...
Harry's user avatar
  • 3,162
1 vote
1 answer
336 views

how to add a user defined condition to a PolicyDocument Statment in AWS Cloudformation

In AWS Cloudformation, I have a user defined condition, and a bucket policy being deployed: Conditions: NotProd: !Not [!Equals [!Ref Environment, production]] ... BucketPolicy: Type: AWS::...
Sabo Boz's user avatar
  • 2,235
1 vote
2 answers
109 views

Dynamic GroupName in Cloudformation

I want to add Stack Names to Security Group Names created with Cloudformation. I mean I would like to add randomize name to the GroupName. Example: ELBSecurityGroup: Type: AWS::EC2::...
James001's user avatar
  • 107