Skip to content

Instantly share code, notes, and snippets.

@miguelludert
Last active February 17, 2023 19:24
Show Gist options
  • Save miguelludert/e633fbdd74e104754f0d37d4f3de4eb6 to your computer and use it in GitHub Desktop.
Save miguelludert/e633fbdd74e104754f0d37d4f3de4eb6 to your computer and use it in GitHub Desktop.
AWS CDK Best practices
  1. Put storage (dynamo, rds, s3, etc) in its own nested stack, seperate from other resources, and reference them externally. This allows us to delete all other resources types without affecting existing storage.
  2. When possible, do not pass in whole resources from one stack to another. This is fine for nested stacks within the same parent stack, but in the 'main' context it creates tight coupling between stacks and can make them more brittle to change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment