First, install the dependencies:
npm install
# or
yarn
Set your AWS Access Key and Secret Access Key on the .env
file:
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
Run:
yarn run deploy
# or to remove:
yarn run remove
If the deployment was completed successfully you will get the CloudFront url on your terminal.
To learn more about Serverless Next.js, take a look at the following resources: