CDK
cdkpw wraps the AWS CDK CLI and injects the right aws sso --profile based on your stack name. No more guessing which profile goes with which environment.
Example usage
cdk deploy "Prod*" - Would append --prod_admin based on the example configuration.
- 🧠 Auto-matches profile by stack name
- 🔒 Supports multiple profiles (dev, prod, secure, etc.)
- ⚙️ Configurable via YAML
- 💨 AWS SSO Wrapper for
cdk
Default: ~/.cdk/.cdkpw.yml Or set CDKPW_CONFIG=/path/to/.cdkpw.yml
Example:
profiles:
- match: Prod
profile: prod_admin
- match: Dev
profile: dev_admin
- match: Secure
profile: secure_admin
cdkLocation: ${CDK_BIN}
verbose: 0|1|2cdkLocation defaults to cdk accepts string or envvars
verbose default to 0 (silent)
Verbose levels:
- 0 (Silent)
- 1 (Info)
- 2 (Debug)
alias cdk='cdkpw' if alias is possible
If used in another nix flake i had to place a tiny cdk executable in front of path:
#!/usr/bin/env sh
exec cdkpw "$@"MIT — do whatever. Just don’t sue the author.
Made by Phelian PRs and stars welcome 🌟