AWS Lambda - Deploy in 2 environments with nextJs

Viewed 227

I am using nextJs with AWS Lambda. (https://www.serverless.com/plugins/serverless-nextjs-plugin)

When I deploy in production I am just doing: serverless

File serverless.yml is:

// serverless.yml

nextApp:
  component: "@sls-next/serverless-component@1.15.1"

It creates 2 folder .serverless and .serverless_nextjs.

I want to have the possibility to deploy in 2 different environments.

For example

serverless --prod => will deploy in Production in AWS

serverless --dev => will deploy in Dev in AWS

0 Answers
Related