Questions tagged [aws-cdk-context]

11 questions
1
vote
1 answer

AWS CDK Error while deploying: The maximum number of addresses has been reached

I have created a private subnet and a NAT gateway in AWS CDK using Python. I have done this by mostly referring to aws docs https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_ec2/ My private and public subnets look like this - …
Mahesh M
  • 69
  • 1
  • 10
1
vote
2 answers

Pass CDK context values per deployment environment

I am using context to pass values to CDK. Is there currently a way to define project context file per deployment environment (dev, test) so that when the number of values that I have to pass grow, they will be easier to manage compared to passing…
Krzysztof Słowiński
  • 6,239
  • 8
  • 44
  • 62
0
votes
1 answer

How to catch error in AWS distributed map state

I'm facing some issues with StepFunctions... Is there a way to Catch errors like States.ExceedToleratedFailureThreshold in DistributedMaps? I have something like this but somehow the Catch isn't applied and the execution just fails when at least one…
0
votes
1 answer

How to set context to fix AWS CDK setContext error when updating past v1.9.0?

I’m trying to update some AWS CDK code past version 1.9.0 to version 1.152.0. However, there’s one issue that is causing a problem - the setContext code is not valid anymore. 
The error message I'm seeing is ‘Cannot set context after children have…
0
votes
0 answers

CDK Java - Referencing nested json context values within a Stack

So I'm just getting started with CDK using Java & I'd like to find how to extract context info from the cdk.context.json. Essentially looking to hold parameters externally from the Stack relative to the environment (dev, test etc). So will be…
jonny99
  • 1
  • 1
0
votes
1 answer

aws cdk Fn.import_value returns token ignores cloudformation output of bucketname and shows token

After successful "cdk deploy CdkS3Stack" the outputs shows up correctly in CloudFormationConsole as well as the cdk output. from aws_cdk import ( Stack, aws_s3 as _s3, CfnOutput ) from constructs import Construct class…
0
votes
0 answers

AWS - CDK - What is the CDK construct to enable 'Encryption in transit' for lambda

I could not find any option in CDK to enable 'Encrypt in transit' configuration for lambda environment variables. Does anyone know how to achieve this. Any help/pointers is much appreciated. Thanks, Horizon
horizon7
  • 1,113
  • 14
  • 18
0
votes
1 answer

AWS CDK Lookup one peered VPC in another account

I have two VPCs(VPC_A, VPC_B) in two different accounts (AccountA, AccountB) and both VPCs are peered successfully. I have CDK code that has a pipeline stage to deploy to AccountA. I have a need to lookup VPC_B from AccountA's context and lookup &…
0
votes
1 answer

issues while using AWS CDK v2 typescript

I have my companies own say @mycompany/cdk": "^1.11.11" (used to manage context environment) which worked with CDK v1, now while using CDK v2 we are facing the error so want to know is it possible to work with CDK v2 and what should we do without…
Ashish Karpe
  • 5,087
  • 7
  • 41
  • 66
0
votes
2 answers

aws-cdk rename S3 bucket?

I'm new to aws-cdk but was curious if it is possible to rename a bucket once it's created so it doesn't have the naming format of ? I've tried this logic const core = require(`@aws-cdk/core`); const s3 = require(`@aws-cdk/aws-s3`); class s3Build…
JBerto
  • 143
  • 5
  • 16
0
votes
2 answers

Creating AWS RDS Postgres with CDK and defining Security Groups

I'm using python CDK to create a Postgres DB and all is fine. I'm using newdatabase = rds.DatabaseCluster( ) Unfortunately, I couldn't find a way to attach an existing security group to this cluster. Anyone know how I could do it with Python?