Prerequisites
- HCP Terraform Cloud workspace (
production/sandbox/test) - Render Dashboard to redeploy the API
1. Publish the new generation
Interraform/<environment>/aws.tf, add a generation named for the year and month. Leave the
pointer alone.
aws_kms_key and update aws_iam_role_policy.signing in
place, nothing replaced or destroyed — these keys carry no prevent_destroy.
2. Redeploy and check
An env group change does not redeploy services. Manual Deploy → Deploy latest reference on the API, then:3. Wait a day
Merchants paste the JWKS URL into their own provider, and a cached set will not have the new key yet.4. Move signing
Pointcurrent_generation at the new generation, apply, redeploy. kms:Sign follows it; the
old key keeps kms:GetPublicKey.
5. Verify
Run an OAuth2 authorization-code flow: theid_token’s kid must be the new generation, and
its signature must verify against the published set. Then an SSO login on a Private key
JWT organization.
6. Wait seven days
Anything the old key signed expires within the hour but we keep a safety margin.7. Retire it
Remove it fromgenerations and apply. The plan must destroy that key and nothing else. KMS
schedules the deletion 30 days out, cancellable until then.
