Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
How to determine the number of random characters CDK adds to Logical IDs?

I'm trying to strip off the random characters from a set of Logical IDs in AWS CDK. (Won't go into too much detail about why as it isn't relevant to the question but the basic reason is so some resources can be retained after stack deletion and then left as-is when recreating the stack. Would like to write a function that will do this automatically for all nodes in a tree).

Have noticed that CDK adds its own random characters onto the end of Logical IDs. E.g:

  • exampleservicevpc0CD2D33A
  • exampleservicevpcingresssubnetEIPFE5428D1
  • exampleservicerole41CC6F17
  • exampleserviceanothervpcIGW1CABF45D

As can be seen above, some of these have 8 random characters and others have 11. (There might be other lengths too but haven't come across any yet). The question I'd like an answer for is how to reliably determine the number of random characters used in any Logical ID?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

CDK Logical IDs are suffixed by 8 characters taken from the md5 hash of the construct tree path.

The OP's examples all conform to the 8-character pattern. The "extra" characters you see are part of the resource name: IGW = Internet Gateway and EIP = Elastic IP.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!