This workshop consists of two web applications and a back-end API. The web applications are run locally while the API is run out of AWS. To get started, we must deploy the API using the Serverless Application Model (SAM) CLI.
api
directory by typing in the following command:cd api
sam build --parallel
sam deploy --guided
NOTE - The above commands will deploy to the default profile configured via the AWS CLI. If you wish to deploy with a specific profile, you can use the following commands.
sam build --parallel
sam deploy --guided --profile <profilename>
Argument | Recommended Value |
---|---|
Stack Name | momento-pizza-app |
AWS Region | use default |
MomentoApiToken | use token obtained from setup step |
Confirm changes before deploy | N |
Allow SAM CLI IAM role creation | Y |
Disable rollback | N |
All “no auth defined” prompts | Y |
Save arguments to configuration file | Y |
SAM configuration file | samconfig.toml |
SAM configuration environment | default |
./admin-ui/next.config.js
(from the root directory).NEXT_PUBLIC_ADMIN_API
property with the copied value.const nextConfig = {
env: {
NEXT_PUBLIC_ADMIN_API: '<copied value from output>'
}
}
module.exports = nextConfig
./order-ui/next.config.js
(from the root directory).NEXT_PUBLIC_ORDER_API
property with the copied value.That’s it! You’re setup and we are ready to start!