Newtons
  • LANDING PAGE
  • General principles
  • Questions
  • React
  • AWS
  • Typescript
  • Testing (Jest)
    • Testing wisdom
    • Definitions
  • Wallaby
  • VsCode
  • Gitlab
  • Material ui
  • Yarn
  • Stripe
  • Keygen
  • React DND Typescript
    • Wrap React-App with React-DND HTML5Backend
  • React Virtualisation
  • Electron
    • Multiple rapid touches in Electron's <webview> cause input freeze
  • Storybook
  • Webpack
  • Serverless
  • Dynamo DB
    • Deploy table after changing key schema
  • S3
  • Route 53
  • API Gateway
  • SSM parameter
  • Cloud watch
  • Cloud front
  • Cloud formation
  • React testing library
  • CSS
  • Usability
  • How to use the KMS
    • When to create a new page
    • What to put in
    • Important information for a bug/issue
    • Important information for an article
    • References
    • When to create a new group
Powered by GitBook
On this page
  • Issue description
  • Working solution
  • Tried solution
  • Hint
  • Reference
  1. Dynamo DB

Deploy table after changing key schema

This is a solution for dynamoDB's deployment issue

PreviousMultiple rapid touches in Electron's <webview> cause input freezeNextWhen to create a new page

Last updated 6 years ago

Issue description

After changing dynamoDB table's key schema, deploying will throw an error:

studentTable - CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename studentTable and update the stack again..

Working solution

Rename the table name in serverless.yml file from xxx to xxx2. Deploy and rename it back to xxx and deploy again and it should work.

Tried solution

Delete the table and redeploy. Same error.

Hint

If you set DeletionPolicy to Delete, this deployment process will delete the table with the old name. You can backup the table first and restore it later.

Reference

CloudFormation cannot update a stack when a custom-named resource requires replacing