When I run ```npx sst remove --stage prod``` I get...
# help
d
When I run
Copy code
npx sst remove --stage prod
I get across the board. When I run
Copy code
npx sst deploy --stage prod
it tells me that my storage stack already exists. I’m not at all sure how to trouble shoot this. Right now I’m basically just comparing my ApiStack vs the notes app one. Any superior ideas?
t
Can you go into the cloudformation section in the AWS console and see if there's any lingering stacks
d
yep they’re all there
shorty after I wen to run
npx sst start
. That failed as well, with the same storage stack issue. Which was weird
t
do you see a storage stack in the UI that you can delete? It's kind of strange because if a stack exists we should just try to update it
can you share the exact error?
d
Copy code
prod-abandond-projects-storage | CREATE_FAILED | AWS::DynamoDB::Table | IdeasTable5FC50FD8 prod-abandond-projects-Ideas already exists
prod-abandond-projects-storage | CREATE_FAILED | AWS::S3::Bucket | UploadsBucketC4B27CC7 
prod-abandond-projects-storage | CREATE_FAILED | AWS::CDK::Metadata | SSTMetadata 
prod-abandond-projects-storage | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | prod-abandond-projects-storage 
Checking deploy status...
Checking deploy status...
Checking deploy status...
prod-abandond-projects-storage | DELETE_SKIPPED | AWS::DynamoDB::Table | IdeasTable5FC50FD8 
prod-abandond-projects-storage | DELETE_COMPLETE | AWS::CDK::Metadata | SSTMetadata 
prod-abandond-projects-storage | DELETE_SKIPPED | AWS::S3::Bucket | UploadsBucketC4B27CC7 
prod-abandond-projects-storage | ROLLBACK_COMPLETE | AWS::CloudFormation::Stack | prod-abandond-projects-storage 

 ❌  prod-abandond-projects-storage failed: prod-abandond-projects-Ideas already exists


Stack prod-abandond-projects-storage
  Status: failed
  Error: prod-abandond-projects-Ideas already exists

Stack prod-abandond-projects-api
  Status: not deployed
Cannot convert undefined or null to object
It is a little weird. I can just mannually blow away the stacks and try again, that’s what I’m thinking the best strategy is, but I was surprised that it happened.
f
Hey @Devin, did you manage to get around the issue?
Looking at the build log you shared, the
prod-abandond-projects-storage
stack failed to deploy because it tried to create a DynamoDB table
prod-abandond-projects-Ideas
, and a table with the same name already exists.
This could happen if have you deployed the table and removed it after.
d
Yeah. I manually removed them all, and will retry again
f
When you remove, by default resources that contain data like DynamoDB tables and S3 buckets don’t get removed (so u don’t lose data when removed accidentally)
d
I’m not sure how i ended up in the weird situation I did. But I don’t really have steps to repro at this time. Agreed that the table appears to already have been deployed
f
For non production stages, you can tell CloudFormation to remove all resources by setting the removal policy to DESTROY
So u won’t run into this issue again.
But don’t set the flag for production stage 🙂
d
Gotcha. I was following https://serverless-stack.com/chapters/custom-domains-in-serverless-apis.html and somewhere in setting up the custom url I borked it. I’ll go through it again in the next day or two and hopefully have more success
So I’ve no idea what I did. But, deleting my existing resources manually, then blowing out 
node_modules
 and 
.build
 (which may have been unnecessary) got me to a successful deploy. I’ll wire up Seed now!
f
Oh nice! Glad it’s working.
d
same! I think I just wired something up in a goofy way. Thanks you all for being so responsive