umma.dev

Node.js with AWS

Steps for working with Claudia, Node.js and AWS

  1. Run npm install claudia in your node.js project folder

  2. Add module.exports = app if you haven’t done so already to your root file

  3. Run npm install aws-sdk aws-serverless-express in your node.js project folder

  4. Run claudia generate-serverless-express-proxy --express-module server in your node.js project folder and this will output a lambda.js file

  5. Now run aws configure in a terminal and input your access key and secret access key

  6. Don’t have an access key and secret access key? Sign in to AWS > Navigate to IAM (Identity and Access Management) > Users > Security Credentials > Create access key

  7. Run claudia create --handler lambda.handler --deploy-proxy-api --region eu-central-1 in your node.js project and the output should give you a link you can navigate to, to view your API