Questions tagged [clouddevelopmentkit]

Cloud Development Kit (CDK) is an open-source software development framework by Amazon Web Services to define cloud infrastructure in code.

The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation.

It offers a high-level object-oriented abstraction to define AWS resources imperatively using the power of modern programming languages. Using the CDK’s library of infrastructure constructs, you can easily encapsulate AWS best practices in your infrastructure definition and share it without worrying about boilerplate logic.

The CDK is available in the following languages:

Useful links

Related tags

11 questions
5
votes
3 answers

Cloud evelopment Kit for CodePipeline fails no matching base directory path found for cdk.out

Hello I would greatly appreciate any comments of the possible source of this error I am getting when using the AWS Cloud Development Kit (CDK) to deploy a Code Pipeline I have a Typecript CDK project (cdk init --language typescript). This uses a…
confusedpunter
  • 137
  • 1
  • 11
4
votes
2 answers

How can you pass variables between cdk stacks without getting cross reference error?

I need to pass INamespace to CloudMapOptions in order that the ECS tasks register to the AWS CloudMap, I get following error. I can't decouple them with CfnOutput, because I need the namespace in the ECS cloudMapOptions: Stack "users" cannot…
4
votes
1 answer

How to create a NAT Gateway in CDK and then add route to a private subnet pointing CIDR to it?

I found some examples on setting NAT Instance to private subnet only. I don't want to let AWS create NAT Gateway in each AZs as I am not going to have multi-AZ.
tom10271
  • 4,222
  • 5
  • 33
  • 62
2
votes
0 answers

AWS API Gateway and DynamoDb Serialization Exception Response Codes

This question resolves how to fix serializaion errors caused by a bad template, but if they are cause by input errors like a missing param, they are returned with a 200. I'm trying to add a response template for errors using the CDK on an DynamoDb…
2
votes
1 answer

IAM Role - AssumeRolepolicy contained an invalid principal: "STAR":"*"

So, I've been trying to write an IAM Role for CodeBuild and CodePipeline in AWS CDK. I need it to be public so I can reference them in their own declaration. I've also tried to generate a simple CloudFormation template out of my code and had no…
1
vote
1 answer

Rename a S3 file using AWS CDK

I wish to rename a file that exists in S3 using CDK. That's pretty much it. The closest thing I found was BucketDeployment and it doesn't work for this purpose. Is there a way to do this, or should I just write a lambda?
Avi Jain
  • 99
  • 1
  • 8
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

How do I reference my lambda from code in AWS Cloud Development Kit?

import software.amazon.awscdk.services.lambda.Function; Function helloLambda = new Function(helloStack, "hellocdkworld123", FunctionProps.builder() .functionName("HelloLambda") …
Peter
  • 5,556
  • 3
  • 23
  • 38
0
votes
1 answer

How to define "URL Query String Parameters" for "Integration Request" on API Gateway via Cloud Development Kit (CDK)

I'm having issues finding examples on how to create "URL Query String Parameters" for "Integration Request" on API Gateway via Cloud Development Kit (CDK). Most examples I find are for lambda (I don't need this) not REST (I need this), and even…
0
votes
2 answers

How can I fetch existing EC2 Instances via Instance-name and add them as targets to ALB using AWS CDK in Python

How can I fetch existing EC2 Instances via Instance-name and add them as targets to ALB using AWS CDK in Python. Please find my sample code below to create an ALB using AWS-CDK-Python Language core, aws_ec2, …
0
votes
1 answer

Problem when deploying a SageMaker Multi-Model Endpoints with AWS CDK/CloudFormation

I am trying to automate the deployment of a SageMaker multi-model endpoints with AWS CDK using Python language (I guess it would be the same by directly writing a CloudFormation template in json/yaml format), but when trying to deploy it, error…