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

How do I specify an existing Lambda function's alias as a DynamoDB trigger using the AWS CDK?

I'm trying to set a trigger for a DynamoDB table using CDK, with the lambda and its alias being already created in a different stack. I want to associate a specific Lambda alias to the DynamoDB table as its trigger. I have this code so far which is…
Mehran
  • 15,593
  • 27
  • 122
  • 221
1
vote
2 answers

AWS CDK Athena Data Source

How I can create an Athena data source in AWS CDK which is a JDBC connection to a MySQL database using the AthenaJdbcConnector? I believe I can use aws-sam's CfnApplication to create the AthenaJdbcConnector Lambda, but how can I connect it to…
1
vote
1 answer

aws_shield_protection Terraform

I am struggling to find a way to include all load balancers with certain tag value's (e.g. Shield protection = ON) in an aws account. Currently i have a map of arn's in a variable and running a for loop. This method work's but not in an efficient…
1
vote
1 answer

How to inject *all* secrets into an ECS task using CDK

I'm using AWS-CDK to deploy an ECS cluster, and I'd like to add secrets from the Secrets Manager. The secret is a large JSON blob with many key/value pairs. I'm including the secrets in my task definition using the following in my task…
calvinyoung
  • 346
  • 2
  • 12
1
vote
0 answers

AWS CDK Codepipeline to build docker before cdk-synth

My use case is as follows: Github repositories A, B and C have the source code for Lambda. A and B are libraries and C is the application that uses libraries A and B. GitHub repository X has the AWS CDK source code Each time a git commit is made to…
1
vote
1 answer

Configure AWS Cognito by CDK for AWS SES (Simple Email Service): Service-linked role permissions - how to do this?

I have following issue with AWS Cognito using AWS SES for sending emails: I configured Cognito using SES by CDK, but I read in the documentation that the "Service-linked role permissions" is required: Using Service-Linked Roles for Amazon…
droebi
  • 872
  • 1
  • 14
  • 27
1
vote
1 answer

cross account SNS topic publish

I have an SNS topic in account A that takes an error and sends to pager duty I have another account - Account B that has several services in it, fargate, SQS etc but I have several cloudwatch alarms / actions setup to publish alerts to this SNS…
user17071347
1
vote
2 answers

CDK deployment and least privilege principle

We're (mostly happily ;)) using the AWS CDK to deploy our application stack to multiple environments (e.g. production, centralized dev, individual dev). Now we want to increase the security by applying the least privilege principle to the deployment…
Chris
  • 347
  • 1
  • 11
1
vote
1 answer

Use an array as response model in AWS Gateway cdk

I'm trying to create a typescript aws cdk to build up an API Gateway with this own swagger documentation. There is one simple endpoint returning a list of "Supplier", but we don't know how to specify this in the cdk. Here the code: export function…
Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
1
vote
1 answer

Is there a way to specify timezone in an auto-scaling schedule?

I'm using CDK to autoscale Lambda provisioned concurrency on a schedule. For example: // Define the provisioned concurrency const target = new asg.ScalableTarget(this, 'ScalableTarget', { serviceNamespace: asg.ServiceNamespace.LAMBDA, …
nixon
  • 1,952
  • 5
  • 21
  • 41
1
vote
1 answer

How to correctly configure APIGateway for CORS using the CDK

I have an API provided by AWS ApiGateway, backed by an AWS Lambda function and provisioned using the CDK. The API has been configured with default CORS settings: const api = new apiGateway.RestApi(this, "comments-api", { …
1
vote
1 answer

AWS CDK api mappings with DomainNameOptions

I have the below cdk in python for building my API domain_name = _apigateway.DomainNameOptions( certificate=certificate, domain_name=custom_domain_name, mtls={ "bucket":…
GeorgeGeorgitsis
  • 1,262
  • 13
  • 29
1
vote
0 answers

generate swagger json after CDK deployment

I do cdk deploy and I get some of these outputs: Outputs: feature.mycomRestApiEndpoint8FB5C89F = https://0lzzz8cdqc.execute-api.us-east-1.amazonaws.com/prod/ feature.mycomRestApiId9C720814 = 0lzzz8cdqc I would like to automate to have this run, or…
James Black
  • 41,583
  • 10
  • 86
  • 166
1
vote
3 answers

aws_cdk events rule target for cdk pipelines fails

below error pops when I try to target a CDK pipeline using events targets. jsii.errors.JavaScriptError: Error: Resolution error: Supplied properties not correct for "CfnRuleProps" targets: element 0: supplied properties not correct for…
1
vote
0 answers

AWS CDK cannot find my credentials at all

I am following the tutorial linked here using Python on Windows: https://docs.aws.amazon.com/cdk/latest/guide/hello_world.html Everything seems fine until I try to use cdk deploy, and end up getting the following error: Unable to resolve AWS account…
Karma Cool
  • 61
  • 8