DEV Community

Ivan Bliskavka
Ivan Bliskavka

Posted on • Edited on • Originally published at bliskavka.com

3

Help: Logical ID Changed in my CDK App

I recently came across a weird error in a private package CDK deploy:

{dynamo table name} already exists in stack {current stack arn}

Upon further investigation it turned out that one of our internal CDK modules for building the dynamo tables has changed how it was naming the construct, resulting in a different CloudFormation Logical ID. Since we were explicitly naming the table, the stack update could not complete, because the table already exists.

This app is a self-contained NPM module, so I wasn't able to modify the construct, but I came up with a workaround.

  1. Back up the dynamo table data
  2. Copy the raw stack yaml from CloudFormation and save it on your computer
  3. Delete the table resource and references from the template
  4. Update the stack with the new template using the CloudFormation web console
  5. Verify that the table was deleted (and not retained) by CloudFormation
  6. Redeploy the CDK app, which will create a new table
  7. Restore the table data

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more