@asdi/aws-infra
v0.4.3
Published
Reusable AWS constructs for deployments
Maintainers
Readme
@asdi/aws-infra
Reusable AWS CDK constructs for deployments.
Install
npm install @asdi/aws-infra
npm i -g @asdi/aws-infra # provides the `asdi` commandQuickstart
From your website project root:
asdi init
asdi add static-website
asdi add syncinitcreatescdk.json({ "app": "npx tsx infra/index.ts" }) and installs@asdi/aws-infra,aws-cdk-lib,tsx.add static-websitecopiesinfra/static-website.tsstarter stack.add synccopies.github/workflows/sync.ymldeploy workflow.
Then:
npx cdk synth
npx cdk diff
npx cdk deployCLI reference
asdi <command>
Commands:
list List templates, workflows and tools.
init Scaffold cdk.json and install dependencies.
add <name> Add a template or workflow by name.
param <push|pull|delete> [options] Sync .env files with SSM Parameter Store.
help Show help.Examples:
asdi list
asdi init
asdi add static-website
asdi add sync --force
asdi param push --file .env
asdi param pull --prefix /myapp --file .env --overwriteOne .env holds multiple SSM prefixes:
# path: /myapp/prod
# string
A=42
# secret
C=23
# path: /myapp/shared
# list
E=1,2,3pushreads# path:sections from the file.pull --prefix /myapprecursively downloads everything under/myappinto# path:sections.delete --prefix /myapp/proddeletes everything under that prefix.
Tools (tools/param):
asdi param push --file .env
npx asdi param push --file .envBackground:
Useful commands (this repo)
npm run buildnpm run typechecknpm run testnpx cdk synthnpm run pack:dry
