Deployment
The Dissertation Editor Platform uses separate deployment mechanisms for backend and frontend.
Backend Deployment
The backend (Lambda functions, API Gateway, DynamoDB tables, S3 buckets) is deployed via Serverless Framework into the PhD Advantage client AWS account (735234196709).
Deploy Command
cd platform/backend
AWS_SDK_LOAD_CONFIG=1 npx serverless deploy --aws-profile dissertation-editor
This runs a full CloudFormation deployment to the dev stage in us-east-1. It provisions or updates all resources defined in serverless.yml.
Single Function Deploy
For faster iteration when only Lambda code has changed (no infrastructure changes):
AWS_SDK_LOAD_CONFIG=1 npx serverless deploy function \
--function <functionName> \
--aws-profile dissertation-editor
Rollback
To roll back to a previous deployment:
AWS_SDK_LOAD_CONFIG=1 npx serverless rollback \
--timestamp <deploymentTimestamp> \
--aws-profile dissertation-editor
Find available timestamps with:
AWS_SDK_LOAD_CONFIG=1 npx serverless deploy list \
--aws-profile dissertation-editor
Frontend Deployment
The Next.js frontend auto-deploys via AWS Amplify.
Amplify Configuration
| Setting | Value |
|---|---|
| App ID | d1vpp3bmermmyp |
| Region | us-east-1 |
| Staging branch | staging (auto-deploy) |
| Production branch | main (auto-deploy) |
How It Works
- A push or merge to the
stagingbranch triggers an Amplify build automatically. - Amplify runs
npm run buildand deploys the Next.js output. - Once staging is verified, merging
stagingintomaintriggers a production deploy.
Manual Redeploy
If you need to trigger a redeploy without a code change:
- Open the Amplify Console in the PhD Advantage account.
- Select the branch (
stagingormain). - Click Redeploy this version.
Amplify Environment Variables
Environment variables for the frontend are configured in the Amplify Console, not in the repository. To update them:
- Open the Amplify Console for the app.
- Go to Hosting > Environment variables.
- Add or update the variable.
- Trigger a redeploy for the change to take effect.
See Environment Variables for the full list.
Git Workflow
feature/my-feature ──PR──> staging ──PR──> main
│ │
Amplify staging Amplify production
Rules
- Never push directly to
mainorstaging. All changes go through pull requests. - Deploy Lambda before frontend when changes span both. The backend must be backward-compatible so the existing frontend continues to work during the deploy window.
- One PR per task. Use squash merge to keep history clean.
- Feature branches are created from
stagingusing the naming conventionfeature/<task-slug>orfix/<task-slug>.
Typical Release Flow
- Create branch:
git checkout -b feature/add-turnaround-options staging - Develop and commit.
- Push and open PR to
staging. - Merge PR. Amplify deploys staging automatically.
- Test on the staging URL.
- Open PR from
stagingtomain. - Merge PR. Amplify deploys production automatically.