Depending on your preferred package manager, follow the instructions below to deploy your project.
Requirements: NodeJS
lts/fermium (v.16.17.0)
. If you're using nvm, runnvm use
to ensure you're using the same Node version in local and in your lambda's runtime.
- Run
npm i
to install the project dependencies - Run
npm run deploy:<STAGE>
to deploy this stack to AWS
- Run
yarn
to install the project dependencies - Run
yarn sls deploy
to deploy this stack to AWS
- Run
npm run test
to test locally after setting environment variables in a .env file
⚠️ As is, this template, once deployed, opens a public endpoint within your AWS account resources. Anybody with the URL can actively execute the API Gateway endpoint and the corresponding lambda. You should protect this endpoint with the authentication method of your choice.
In order to test the hello function locally, run the following command:
npm start
Copy and replace your url
- found in Serverless deploy
command output - and name
parameter in the following curl
command in your terminal or in Postman to test your newly deployed application.
curl --location --request 'https://myApiEndpoint/dev/movies'
There are AWS CodePipelines set up for deployment to each stage