Questions tagged [aws-cdk]

The AWS CDK is an infrastructure modeling framework that allows you to define your cloud resources using an imperative programming interface.

The AWS CDK is an infrastructure modeling framework that allows you to define your cloud resources using an imperative programming interface, currently TypeScript/JavaScript, Python, Java, C# and (beta) Go.

Developers can use one of the supported programming languages to define reusable cloud components called Constructs, which are composed together into Stacks and Apps.

The AWS CDK Toolkit is a command-line tool for interacting with CDK apps. It allows developers to synthesize artifacts such as AWS CloudFormation Templates, deploy stacks to development AWS accounts and “diff” against a deployed stack to understand the impact of a code change.

The AWS Construct Library includes a module for each AWS service with constructs that offer rich APIs that encapsulate the details of how to use AWS. The AWS Construct Library aims to reduce the complexity and glue-logic required when integrating various AWS services to achieve your goals on AWS.

3488 questions
1
vote
1 answer

Map private DNS records to EC2 instances with CDK

I'm using aws-cdk to run 7 ec2 instances which will be MongoDB nodes. I'm able to create them with their security group and stuff, but I don't understand how can I map those in private DNS. for (inst i = 1; inst<8; inst++) { new ec2.Instance(this,…
Mr.Mister.
  • 23
  • 7
1
vote
1 answer

How can I disable transition in codepipeline via CDK?

I am using nodejs CDK to deploy codepipeline to AWS. Below is the code: const pipeline = new codepipeline.Pipeline(this, this.projectName, { pipelineName: this.projectName, role: this.pipelineRole, stages, artifactBucket:…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
1
vote
1 answer

S3 Event notification to KMS_MANAGED encrypted SQS queue (in CDK) not working

I have an architecture developed with CDK with a S3 bucket and an event notification which will send a message to a SQS for each uploaded file to S3. It works fine. Now I'm trying to activate the encryption and I have the following: for S3 -> I…
CC.
  • 2,736
  • 11
  • 53
  • 70
1
vote
0 answers

AWS CDK (Typescript) error in RDS Instance Creation: "Error: There are no 'Isolated' subnet groups in this VPC."

In AWS CDK, I created a private subnet (without adding mapPublicIpOnLaunch) and I get this error when creating my RDS instance. Here is my code of the steps I take to get everything prepared: I grab my VPC from my account Create a new private…
Roma
  • 535
  • 6
  • 18
1
vote
1 answer

aws eventbridge set ssm-document as target with aws-cdk python

hope I did not overlook an already existing answer .. I would like to create an aws-cdk python stack containing an event that is starting an ssm-document when triggered. I got all the wanted stuff going in my aws test account, event is triggering on…
Anepopane
  • 23
  • 2
1
vote
1 answer

Can a CDK application discover which command is being invoked?

In my CDK application, I would like to use different logic for validating some context parameters during CDK destroy. Is there a way for the CDK application to determine which command is being invoked?
Dave
  • 332
  • 1
  • 7
1
vote
1 answer

How to add domain alias to existing CloudFront distribution using AWS CDK

I just deployed a CloudFormation solutions from the AWS Solutions. The solutions included a new CloudFront distribution. My challenge is that I want to add a custom domain mysite.example.com to the dxxxxxx.cloudfront.net distribution. I already…
1
vote
1 answer

Dynamodb table reference in step function on localstack + aws cdk not working

Dynamodb is defined using aws CDK and deployed to localstack: new Table(this, 'idlist-staging', { tableName: 'idlist-staging', readCapacity: 1, writeCapacity: 1, partitionKey: { name: 'external_id', type: AttributeType.STRING…
yen
  • 1,769
  • 2
  • 15
  • 43
1
vote
1 answer

AWS cdk error when trying to create App Runner

I'm trying to deploy my application with App Runner in AWS via CDK. It's based on https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apprunner.Service.html. When I deploy this, I get: create_failed: Resource handler returned message:…
1
vote
0 answers

how to bypass CodePipeline artifact size limit in CloudFormation AWS CDK?

I have been using AWS pipeline to manage the deployment of my cloud formation stack. The code pipeline is created using AWS CDK. I have reached the code pipeline artifact size: 256MB and now I am blocked from deploying new changes. On Github, they…
1
vote
2 answers

How to import an existing resource into AWS CDK from a different AWS account

I have an AWS codpipeline created with CDK and I want to deploy to a codedeploy deployment group in another account. Any Idea how I can import an existing deployment group in another account into my stack?
1
vote
1 answer

Issue in Lambda execution time

I am working on a project where I have to scrape maximum URLs (placed in an S3 bucket's file) in a limited time and store them in searchable database. Right now I am having an issue while scraping web pages inside aws lambda. I have a function for…
Usama Ali
  • 33
  • 5
1
vote
1 answer

Running CDK bootstrap against LocalStack fails with credentials error

I'm running LocalStack in docker and trying to deploy CDK resources into it. LocalStack seems to run OK: docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS …
hofnarwillie
  • 3,563
  • 10
  • 49
  • 73
1
vote
1 answer

Purpose of "prepare" method of AWS CDK constructs?

TL;DR: What is the purpose and function of prepare(): void method of AWS CDK's Construct class? How and when am I supposed to use/avoid it? The documentation on prepare() says: protected prepare(): void Perform final modifications before…
Parzh from Ukraine
  • 7,999
  • 3
  • 34
  • 65
1
vote
1 answer

docker login --username AWS --password-stdin https://.dkr.ecr..amazonaws.com exited with error code 1:

I'm simply adopting the Eventbridge ETL design pattern and it gives me this error when I deploy: [100%] fail: docker login --username AWS --password-stdin https://315997497220.dkr.ecr.us-west-2.amazonaws.com exited with error code 1: ❌…