Note: It is not necessarily the actual Amazon EC2 design.
Company wants to build an Amazon EC2 product. The first use case is to allow customers launch instances.
First story is “As a developer, I want to launch an instance”. Flow describes developer experience launching an instance using AWS Management Console.
Requirements are not described in this example for brevity.
Context
We need to identify application boundaries by describing stories and flows on technical level.
Decision
The decision is to create two applications: EC2 Instances Console and EC2 Instances Control Plane.
Consequences
Context
We need to identify EC2 Instances Console components by describing requirements on technical level.
Decision
EC2 Instances Console application contains Toolchain and Service components. Toolchain component contains Deployment Pipeline and Pull Request Build components. Service component contains Network, Ingress, Compute, WebApp, Database and Monitoring components. Toolchain and Service resources deploy as a stack each.
Consequences
Context
We need to identify EC2 Instances Control Plane components by describing requirements on technical level.
Decision
EC2 Instances Control Plane is not described in this example for brevity.
Consequences
EC2 Instances Console: ec2-instances-console
EC2 Instances Console
The example uses AWS Cloud Development Kit (AWS CDK) pseudo code for resources configuration. It should be possible to use the same approach with other cloud automation tools.
service/
ui/
Dockerfile
app.py
instances.py
compute.py
class Compute(Construct):
ec2.SecurityGroup
ecs.Cluster
ecs.Service
ecs.TaskDefinition
ecr_assets.DockerImageAsset
database.py
class Database(Construct):
ec2.SecurityGroup
elasticache.CacheCluster
ingress.py
class Ingress(Construct):
ec2.SecurityGroup
elasticloadbalancingv2.NetworkLoadBalancer
elasticloadbalancingv2.TargetGroup
certificatemanager.Certificate
route53.HostedZone
route53.CNAMERecord
waf.WebACL
monitoring.py
class Monitoring(Construct):
cloudwatch.Metric
cloudwatch.Alarm
cloudwatch.Dashboard
xray.Group
network.py
class Network:
ec2.VPC
ec2.Subnet
ec2.RouteTable
service_stack.py
class ServiceStack(Stack):
compute.Compute
database.Database
ingress.Ingress
monitoring.Monitoring
network.Network
toolchain/
deployment_pipeline.py
class DeploymentPipeline(Construct):
pipelines.CodePipeline
pull_request_build.py
class PullRequestBuild(Construct):
codebuild.Project
toolchain_stack.py
class ToolchainStack(Stack):
toolchain.deployment_pipeline.DeploymentPipeline
toolchain.pull_request_build.PullRequestBuild
app.py
service.service_stack.ServiceStack("EC2InstancesConsole-Service-Sandbox")
toolchain.toolchain_stack.ToolchainStack("EC2InstancesConsole-Toolchain-Sandbox")
toolchain.toolchain_stack.ToolchainStack("EC2InstancesConsole-Toolchain-Management")