Before trying to run nx run serve
or nx run deploy
you must have:
- SAM installed which is different as per your OS
- esbuild available in your PATH
npm install -g esbuild
Now after both are installed you can go ahead and run nx run serve
which should:
- Invoke
sam build
which builds your artifacts and copies them to.aws-sam
- Invoke
sam local invoke
which invokes the function defined inside of yourtemplate.yaml
file
Note: Before attempting to deploy you must have completed the prequistes for using AWS services such as:
- Creating an AWS Account
- Provisioning an admin user
- Creating Access keys
To deploy you run
nx run deploy