v2.4.2

Environments

drive-apig deploys to three stages across two AWS accounts.

StageAWS accountAWS profileAPI domain
devnon-prodaws-drive-staging-admindev-api.drivemustang.com.au
stagingnon-prodaws-drive-staging-adminstaging-api.drivemustang.com.au
prodprodaws-drive-prod-adminapi.drive.com.au

Dev and staging share the non-prod account and *.drivemustang.com.au certificate. Prod is isolated on the prod account and api.drive.com.au.

Stage resolution

Serverless defaults to dev unless --stage is passed:

yaml
provider:
  stage: ${opt:stage, 'dev'}

Most resource names and SSM params are stage-prefixed:

/${stage}/drive/apig/drive-api/id
${stage}-drive-api-leads-fn-in-queue
${stage}-drive-api-ssm-config

Per-stage config

Service behavior toggles live under custom.app.* in each service's serverless.yml and are read with ${self:custom.app.<key>.${self:provider.stage}}.

Example from leads:

yaml
custom:
  app:
    rateLimitsEnabled:
      dev: 0
      staging: 1
      prod: 0
    emailMode:
      dev: dryrun
      staging: live
      prod: live
    enquiryEndpoints:
      dev: https://staging-leads-api.drive.com.au/v1/
      staging: https://staging-leads-api.drive.com.au/v1/
      prod: https://leads-api.drive.com.au/v1/

Tracing

The shared config enables Lambda tracing through TRACING_LAMBDA with a default of true; custom.tracing also records the intended stage policy:

yaml
custom:
  tracing:
    dev: false
    staging: false
    prod: true

OpenTelemetry export is configured for all stages through the shared collector and tags signals with deployment.environment.

Esc