Skip to content

Document AWS CLI token expiry impact on CDK deployments #236

Description

@scottgerring

Problem

AWS deployments can take 30+ minutes across multiple CDK stacks. Organizations using temporary AWS credentials (SSO, STS assume-role) can hit token expiry mid-deploy, causing partial failures.

If a user panics and manually deletes CloudFormation stacks, this orphans CDK's local context (cdk.context.json), causing subsequent deploys to fail with confusing errors.

Suggested Fix

  1. Each per-service deploy task (e.g. //sticker-award:aws:deploy) should run aws sts get-caller-identity before starting and produce a clear, helpful error message if credentials are invalid or expired — rather than failing deep into a CDK deploy.

  2. Add a troubleshooting/prerequisites section to the deployment docs covering:

    • AWS deployments can take 30+ minutes — ensure you have a fresh token before starting
    • If interrupted by token expiry: re-authenticate and re-run mise run aws:deploy:local. CDK/CloudFormation will resume from where it left off
    • Do not manually delete CloudFormation stacks. If you already did, delete cdk.context.json in the relevant infra/aws directories before re-deploying

Part of #235

Metadata

Metadata

Assignees

No one assigned

    Labels

    awsdocumentationImprovements or additions to documentationinfraCommon infastructure bitsshared-infra

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions