Deploy part of the build log: ``` ================...
# seed
k
Deploy part of the build log:
Copy code
====================
🚀 Deploy
====================
$ cd /tmp/seed/source
INFO: before_deploy hook not found. You can define it in your build spec.
INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
INFO: Publishing assets...
3.04 s
INFO: Deploying 4 stacks...
34.12 s
❌ dev-notes-StorageStack: dev-notes-Notes already exists in stack arn:aws:cloudformation:us-east-1:168458715623:stack/dev-notes-storage/8c33eb70-33db-11ec-8990-0e40bd8a36fb
➖ dev-notes-ApiStack: Skipped
➖ dev-notes-AuthStack: Skipped
➖ dev-notes-FrontendStack: Skipped
INFO: Stacks output:
Stack dev-notes-StorageStack
Stack dev-notes-ApiStack
Stack dev-notes-AuthStack
Stack dev-notes-FrontendStack
f
Hey @Kenny, as the error suggest, u already have a DynamoDB table named
dev-notes-Notes
Go into the AWS DynamoDB console, remove the table, and then try deploying again.
k
how do i remove the table
from the command line
I changed
Copy code
const table = new Table(stack, "Notes", {
    fields: {
      userId: "string",
      noteId: "string",
    },
    primaryIndex: {
      partitionKey: "userId",
      sortKey: "noteId",
    },
  });
to
Copy code
const table = new Table(stack, "UserNotes", {
    fields: {
      userId: "string",
      noteId: "string",
    },
    primaryIndex: {
      partitionKey: "userId",
      sortKey: "noteId",
    },
  });
It now deploys to dev succesdully
a
This things usually happen when you rename your stack before removing the stack with the "old" name. Happened to me one or two times. What I did was renaming the stack back to the "old" name, run a sst remove to make sure that no "orphaned" resources remain in the target account, then again rename the stack to the new name.
k
man, it got worse haha
Now i renamed it for a second time
to "NotesData"
I first ran
npx sst remove
then
npx sst remove --stage prod
f
AWS resources containing data ie. Tables and Buckets aren’t removed on
sst remove
unless removal policy is set to
destroy
https://docs.serverless-stack.com/constructs/App#setting-a-default-removal-policy
I’d say go to AWS DynamoDB console, and cleanup the old tables.
k
ok
what does this error mean?
failed: Export kenny-notes-StorageStack:ExportsOutputRefNotesDataTable81206A2C9BE4093B cannot be deleted as it is in use by kenny-notes-ApiStack
I deleted it all in the aws console
ApiStack is also deleted🤔
*fixed