Add a Create Note API


I have the issue that some other people have, where I run the two commands and nothing happens. I know that serverless is installed correctly. I have my dynamodb table connected in my serverless.yml file. Any ideas of what could be wrong?
I also made sure that I had the correct version of node written into my serverless.yml file
There may be something wrong with how I set up serverless, since when i try typing in “aws s3 ls” the response i get is ‘Connection was closed before we received a valid response from endpoint URL: “”.’



Oh that’s not good. If your aws commands don’t work then a lot of the other commands aren’t going to work either. Are you not connected to the internet or are you using a proxy?



I was connected to the internet, and for some reason I couldn’t connect to AWS at all. The commands kept on timing out before they had a chance to run. I uninstalled everything and am trying to totally reinstall everything from scratch, and I will see what happens. The only issue that I could think of was that there was something wrong with how python was set up, but I am not sure.

I ended up figuring it out. I am not sure exactly what the issue was, but I think part of the issue was a permissions issue. I had created and done everything in SUDO ( in admin) and so when I tried running it, it just didn’t let me do it. There may have been other things that were the issue along the way, but I think that was the biggest one.

1 Like


Is there a best practice for how to access the DynamoDB table’s region name from outside of the Lambda function in the create.js file?

My question was triggered by this comment:

  • The AWS JS SDK assumes the region based on the current region of the Lambda function. So if your DynamoDB table is in a different region, make sure to set it by calling AWS.config.update({ region: "my-region" }); before initilizing the DynamoDB client.


Hmm I’m not entirely sure what the best practice here is. Typically, you keep your Lambdas in the same region as your Tables. Setting the region in the config is required to use the AWS SDK.



Thank you for this comment! I decided to just move on too and found the updated format much easier to troubleshoot.

In my case I named my DynamoDB table differently than the tutorial - deviating is always risky (case in point) but I wanted the name to be recognizable down the road. For me my TableName in ‘params’ needed to be changed to my edited name

1 Like