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

Multiple Instance AWS CDK python

How to launch multiple instances via AWS CDK using Python. below code will create a single instance. instance = ec2.Instance(self, "Instance", instance_name = "myinstance", instance_type=ec2.InstanceType("t3a.medium"), …
JPG
  • 21
  • 2
1
vote
1 answer

How to implement a central API account in a multi account environment using the CDK

I have a multi-account strategy in AWS. All is deployed using the CDK. Each service has it's own account and I want to achieve this (recommended by this aws blog post): If I deploy the API account first, it needs the other account's lambda ARNs…
atoledo
  • 435
  • 5
  • 12
1
vote
3 answers

How to create tables in Postgres RDS using CDK?

I created a Postgres RDS database using the CDK. I read the documentation but didn't find a way to create tables through it. The language I'm using is TypeScript.
Gulshan
  • 63
  • 8
1
vote
1 answer

How to set "targets" in creating ALB in CDK?

Current Code import * as elasticloadbalancingv2 from "@aws-cdk/aws-elasticloadbalancingv2"; . . . target: ec2.Instance const targetGroups = new elasticloadbalancingv2.ApplicationTargetGroup(this, "TargetGroup", { healthCheck: { path: "/", …
Take
  • 57
  • 1
  • 9
1
vote
2 answers

AWS CDK Get Pinpoint Project/Application ID

In the AWS CDK, it's straight forward to create a Pinpoint Service. But how do you get the Project ID (also referred to as the Pinpoint App ID or Application ID) for use in subsequent CDK code. Create a Pinpoint project: const pinpointProject = new…
Matthew
  • 2,871
  • 5
  • 34
  • 59
1
vote
3 answers

How to deploy Python AWS Lambda with its dependencies using Javascript AWS CDK?

I have an AWS CDK stack built using javascript. The Stack has multiple lambdas. Most of them are in javascript. I want to add one lambda in python. The python lambda works fine when I don't import external dependencies, but doesn't understand when I…
anasqadrei
  • 315
  • 2
  • 13
1
vote
1 answer

How to add a file to container under EC2 instance?

I have an application that I need to deploy in AWS. The application has default properties which should be overridden for each env (qa/prd etc.) using overrides.properties file. Source code of the application is composed to docker image and sent to…
1
vote
0 answers

How to add bake times between different stages of pipeline?

I am a beginner in writing server less application using aws-cdk. I need to add bake time between different stages of my pipeline. I have two test stages (beta, gamma) and production stage. Didn't find anything useful on google. Please guide.
1
vote
1 answer

aws: prefixed tag key names are not allowed for external use

I have deployed 2 services using aws CDK typescript. One of the services by default got listed in Tags of AWS Cost Explorer service: So I tried to add tag to another service : export class CdkStack extends cdk.Stack { constructor(scope:…
Ashish Karpe
  • 5,087
  • 7
  • 41
  • 66
1
vote
2 answers

CDK Pipelines: Use Stack output in `post`step of stage

I have a pipeline stack with a stage. This stage contains multiple stacks. One of the stacks creates a Step Function. Now I would like to trigger that step function in the post of the stage (I created InvokeStepFunctionStep as a custom…
Korgen
  • 5,191
  • 1
  • 29
  • 43
1
vote
1 answer

I need a strategy for handling optional SSM Parameter Store parameters in CDK

In my stack definition I pull in a number of parameters from SSM Parameter Store... const p1 = ssm.StringParameter.fromStringParameterAttributes( ... ) const p2 = ssm.StringParameter.fromStringParameterAttributes( ... ) I then pass them along to…
Roger Heathcote
  • 3,091
  • 1
  • 33
  • 39
1
vote
0 answers

How to update RDS instance type defined in CDK / Cloudformation

I have an RDS DatabaseCluster set up using CDK that's deployed and running with the default instance type. I want to upgrade the instance type to something larger and deploy it with (hopefully) no downtime. The RDS docs has a Scaling Your Amazon RDS…
1
vote
1 answer

aws - Is it possible to have unit tests in Typescript for a Python CDK?

I know this is a vague question. But I have my CDK setup in Python. I want to now carry out unit tests, but with the exploration it seems that relevant libraries aren't available in Python, as in Typescript. Just trying to understand if anyone has…
1
vote
1 answer

ECS TaskDefinition creation fails with "Invalid request provided: Create TaskDefinition: Unknown volume 'null'."

I am attempting to use the CDK to deploy an EC2 TaskDefinition for a DataDog agent which uses 3 bind mount volumes. The DD example task definition looks pretty simple. The fragment of a Cloudformation template below has been generated by the AWS…
Simon Gill
  • 1,096
  • 9
  • 22
1
vote
1 answer

AWS CDK - skip Docker bundling

I am bundling lambda functions and lambda layers code using Docker. Like this: code = Code.from_asset( path='/path/to/code', asset_hash_type=AssetHashType.BUNDLE, bundling=BundlingOptions( …
Laimonas Sutkus
  • 3,247
  • 2
  • 26
  • 47