This repository contains a set of workouts to train yourself on AWS services, using CDK or Terraform IAC frameworks.
I have grouped Workouts by knowledge categories:
- Networking: 1-networking (VPC, subnets, security groups, peering, dns, NAT gateway, VPC endpoints...)
- Computing: 2-computing (EC2, ECS, Lambdas, ALB, Auto-scaling)
- Storing: 3-storing (S3, RDS, Dynamodb)
- Protecting: π° Soon...stay tuned (KMS, S3, ACM)
- Publishing: π° Soon...stay tuned (CloudFront, pre-signed URL, OAI)
- Orchestrating: π° Soon...stay tuned (Step Functions)
In each knowledge area, workouts are ordered by difficulty. Example:
- 101-basic-vpc
- 102-basic-subnets
- 103-vpc-default-route-default-security-group
- 104-internet-access
- 105-nat-gateway and so on...
Some workouts rely on previous workouts (dependencies). Provided shell commands to apply/delete workouts automatically verify required dependencies.
- Install
jq
: https://stedolan.github.io/jq/tutorial/ - Install
AWS CLI
: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html - Install
Terraform
: https://learn.hashicorp.com/tutorials/terraform/install-cli - Install
Terragrunt
: https://terragrunt.gruntwork.io/docs/getting-started/install - Install
Serverless Framework
: https://www.serverless.com/framework/docs/getting-started - Install
CDK
: https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html
All workouts have been tested with:
- AWS CLI 2.2.10
- Terraform 1.0.2
- Terragrunt 0.36.1
- AWS CDK 2.27.0
- Serverless Framework 2.3.0
- Mac OS 10.15
- Ubuntu 20.04 LTS
Many of the resources created by these workouts induce costs. All these workouts execute on YOUR AWS account.
You are responsible to delete workouts and associated resources, services or components at the end of workouts. Otherwise, AWS will bill you...
I highly suggest you creating a budget and budget alerts in your AWS account.
Follow this AWS tutorial
NB: Resources and components created using the provided stacks are tagged with a Purpose
Tag.
You will be able to list all resources, using the AWS Tag Manager in AWS Console.
A ./list-resources.sh
shell command is also available to list all resources tagged.
First follow this documentation to set up an AWS profile named aws-workout
on your computer.
All shell commands (Terraform, CDK and tests) provided in these tutorials require this profile.
Some workouts will create EC2 VMs that requires SSH key pairs to log-in. Follow this tutorial to create and import a keypair in AWS Key Pair.
You can perform Workouts with two IAC frameworks:
- Terraform: you will see basics of Terraform and Terragrunt while learning AWS. See Terraform
- AWS CDK: you will see basics of CDK while learning AWS. See CDK
These workouts do not intend to show Terraform or CDK best practices.
- Terraform allows modifying default objects (routes...) whereas CDK does not.
- Terraform provides some syntactical sugar whereas CDK offers L1 constructs (low level), L2 (high order constructs)...
- Terraform workouts may require states from the previous workouts (stored in Terraform State S3 bucket).
- CDK workouts may require stack outputs from previous workouts (stored in AWS CloudFormation Stacks). οΈ
If you want to use TERRAFORM versions, go there πTerraform Workouts.
If you want to use CDK versions, go there πCDK Workouts.