AWS Secrets & Parameters – Dev Cheat Sheet

Quick reference for the main AWS Secrets Manager secrets and SSM Parameter Store parameters used by this repo, plus common ways to consume them.

Unless otherwise noted, names below are for prod. For non-prod, swap the prod / /prod prefix for the environment name (e.g. dev, staging).


High-level rules

  • Prefer environment variables in ECS tasks over calling AWS APIs directly.
  • Secrets live in AWS Secrets Manager; config-ish values often live in SSM Parameter Store.
  • Naming conventions:
    • Secrets: ${environment}/service/thing (example: prod/backstage/database-url)
    • SSM params: /${environment}/namespace/resource (example: /prod/blog-data/buckets/cache)

Key Secrets Manager entries

Secret name (prod)What it isHow you use it (most common)
prod/db/adminAurora admin creds (username/password JSON)One-offs / tooling that need full DB admin
prod/backstage/dbBackstage DB creds (JSON)Backstage DB bootstrap task via BACKSTAGE_DB_SECRET_JSON
prod/backstage/database-urlBackstage DB URL (Postgres)Backstage ECS via BACKSTAGE_DATABASE_URL
prod/backstage/session-secretBackstage auth session secretBackstage ECS via AUTH_SESSION_SECRET
prod/github/pat/blog_data_ciGitHub PAT shared by Backstage & Prefect deployerBackstage GITHUB_TOKEN; Prefect deployer via secret-name var
prod/circleci/pat/backstageCircleCI PAT used by BackstageBackstage ECS via CIRCLECI_AUTH_TOKEN
prod/prefect/database-urlPrefect API DB URL (Postgres)Prefect API ECS via PREFECT_API_DATABASE_CONNECTION_URL
prod/prefect/api-authPrefect API auth token/creds for workers & CIWorkers / CI when calling Prefect API
prod/kinde/client-secret-2pS4d3Kinde OIDC client secret used by ALBALB OIDC auth for Backstage & Prefect
blog-data/neo4j/credentialsNeo4j URI + credsPrefect flows, web app (via config)
blog-data/cloudinary/credentialsCloudinary cloud name + key + secretPrefect flows, web app image handling

Key SSM Parameter Store entries

Param name (prod)What it is / example valueWho/what reads it
/prod/shared/cf_alb_secretSecureString shared header for CloudFront → ALBALB module / listener rules
/prod/blog-data/buckets/cacheS3 bucket name for blog-data cache layerPrefect flows/tools → BLOG_DATA_BUCKET_CACHE
/prod/blog-data/buckets/rawS3 bucket name for blog-data raw layerPrefect flows → BLOG_DATA_BUCKET_RAW
/prod/blog-data/buckets/cleanS3 bucket name for blog-data clean layerPrefect flows → BLOG_DATA_BUCKET_CLEAN
/prod/blog-data/buckets/design-filesS3 bucket for design files layerORK processor lambda, tools
/prod/infra/park_modeparked / unparkedCircleCI Terraform workflows
/prod/infra/database_restore_modefrom_final_snapshot / cleanCircleCI Terraform workflows
/prod/prefect/deployer/cluster_arnECS cluster ARN for Prefect deployerCI / scripts that run deployer task
/prod/prefect/deployer/task_definition_arnECS task definition ARN for Prefect deployerCI / scripts that run deployer task
/prod/prefect/deployer/subnet_idsComma-separated private subnet IDsCI / scripts that run deployer task
/prod/prefect/deployer/security_group_idSecurity group IDCI / scripts that run deployer task

How to consume these (fast examples)

Inside ECS tasks (preferred)

Use env vars wired by Terraform instead of calling AWS directly.

import os

backstage_db_url = os.environ["BACKSTAGE_DATABASE_URL"]
const token = process.env.GITHUB_TOKEN
if (!token) throw new Error('GITHUB_TOKEN not set')

From your terminal (AWS CLI)

# SSM: plain String
aws ssm get-parameter \
  --name "/prod/infra/park_mode" \
  --query 'Parameter.Value' --output text

# SSM: SecureString
aws ssm get-parameter \
  --name "/prod/shared/cf_alb_secret" \
  --with-decryption \
  --query 'Parameter.Value' --output text

# Secrets Manager: JSON secret
aws secretsmanager get-secret-value \
  --secret-id "prod/db/admin" \
  --query SecretString --output text | jq .username

From Python using boto3

import boto3, json

ssm = boto3.client("ssm")
park_mode = ssm.get_parameter(
    Name="/prod/infra/park_mode",
    WithDecryption=False,
)["Parameter"]["Value"]

secrets = boto3.client("secretsmanager")
creds = json.loads(
    secrets.get_secret_value(SecretId="prod/db/admin")["SecretString"]
)
username = creds["username"]
password = creds["password"]