Add an API to Create a Note

I take that back, it won’t get removed automatically. It needs to be explicitly removed. I’ll add a note to the guide.

Edit: I think in your case, since you’ve removed the files that created that stack; you can manually remove it from CloudFormation in the AWS console.

I’m trying to think how this would be handled if I were using Serverless Framework. A stack would rely on a serverless.yml file. I probably wouldn’t just delete a serverless.yml file on a whim. So maybe I should just be aware that this can happen while moving forward.

I wonder how this situation should be handled in the real world. Let’s say you have a production application that has one stack. Then you want to split it into a few new and separate stacks. How should you handle that situation? You’d delete the original stack file and create three new ones, but at which step will the original stack be deleted? Is there an elegant way to do that? Would something like Seed handle that for you?

Splitting stacks in SST is easier because of CDK. You don’t need to delete the original one. Just create a new one and move resources over to it. Referencing across stacks is also simpler, they are just class properties. Not sure if there’s a reason to remove an actual stack.

This scenario here is different because we want to remove the Hello World stack we created as a demo and start over. So we need to run a npx sst remove <stack_name>.

Just for other people, I was getting a {“message”:“Not Found”} response when I first tried to test the API via curl. An hour later I figured out that I had accidentally written “POST /nodes” instead of “POST /notes” for my route in ApiStack.js.

I couldn’t find any information Googling this problem, so thought I’d post here in case somebody else makes a bone-headed mistake like me!

Hello guys< I’ve been working on this guide and everything was going ok but suddenly in “Add an API to Create a Note” chapter when I deploy the app after having installed npm install aws-sdk uuid@7.0.3 I got an issue with my deployment. so I’m not getting the same response as the guide.

this is the screenshot with my issue

I’ve been following the steps carefully and double-cheking everything but am still stuck on this step.

any help I’d appreciate it.

thanks

Any idea why I get this error, “Property ‘Notes’ does not exist on type ‘TableResources’.ts(2339)” when creating the create.ts initially and after the refactor. I am able to add a new note using the Test API curl command. Here’s a screen shot:


Update: I don’t get the error now that I pushed the APIs to the repository.

1 Like