• Stars
    star
    234
  • Rank 171,630 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Configure and deploy complete ECS solutions with Terraform or CDK

Amazon ECS Blueprints

Welcome to Amazon ECS Blueprints!

When new users want to adopt containers to build, deploy, and run their applications, it often takes them several months to learn, setup, and realize container benefits. With Amazon Elastic Container Service (ECS) and AWS Fargate users don't need to manage any middleware, any EC2, or host OS. With ECS Solution Blueprints, we want new users to achieve benefits of container-based modernization in hours rather than months!

The blueprints are meant to give new users a jumpstart, and enable them to learn-by-doing. With blueprints we aspire to codify best practices, well-designed architecture patterns, and provide end-to-end solutions addressing CI/CD, observability, security, and cost efficiency.

We fully expect you to get started by copying the modules and examples but we do not expect you to maintain any conformity to this repository. In others words, we expect that you will adapt and extend the modules and examples code to suit your needs. If you feel your use cases and solutions will help other users, we encourage you to contribute your solutions to ECS Solution Blueprints.

Prerequisites

  • You can use AWS Cloud9 which has all the prerequisites preinstalled and skip to Quick Start
  • Mac (tested with OS version 12.+) and AWS Cloud9 Linux machines. We have not tested with Windows machines
  • IaC Tool
    • Terraform (tested version v1.3.7 on darwin_amd64)
    • AWS CDK (tested vision 2.70.+)
  • Git (tested version 2.27.0)
  • AWS CLI
  • AWS test account with administrator role access
  • Configure the AWS credentials on your machine ~/.aws/credentials. You need to use the following format:
[AWS_PROFILE_NAME]
aws_access_key_id = Replace_with_the_correct_access_Key
aws_secret_access_key = Replace_with_the_correct_secret_Key
  • Export the AWS profile name
export AWS_PROFILE=your_profile_name
  • You can also set the default region and output format in ~/.aws/config. Something like:
[default]
output = json
region = us-west-2

Quick Start for ECS Blueprints for Terraform

Please refer ECS Blueprints Workshop in detail.

  • Fork this repository.

  • Clone your forked repository to your laptop/Cloud9 VM.

git clone https://github.com/<your-repo>/ecs-blueprints.git
  • Start with core-infra to create cluster, VPC, and require IAM
cd ecs-blueprints/terraform/fargate-examples/core-infra/

terraform init
terraform plan
terraform apply --auto-approve
  • Now we can deploy a load balanced service along with CI/CD pipeline to the above cluster
cd ../lb-service
terraform init
terraform plan
terraform apply --auto-approve

You can use the ALB URL from terraform output to access the load balanced service. The above will give you a good understanding about the basics of ECS Fargate, and ECS service. You can use these as building blocks to create and deploy many ECS services. Next you can try other example blueprints.

Repository overview

This repository has 3 main folders

  • modules: Each module is a collection one or more resources that are used together to address specific needs. If you are going to contribue new modules, that is, commonly used group of resources, then put them in the modules folder.
  • examples (aka solution blueprints): This folder contains solution blueprints that are meant to address end-to-end requirements for specific scenarios. If you are looking to contribute new blueprints, put them in the examples folder.
  • application-code: These are just sample applications used in the examples. Currently, these applications are basic but we encourage contributing more real world applications that can help uncover specific aspects of containerized applications. For example, an application that can be used to test autoscaling, or an application that has long running sessions and would work better with blue/green deployments.

Support & Feedback

ECS Blueprints for Terraform is maintained by AWS Solution Architects. It is not part of an AWS service and support is provided best-effort by the ECS Blueprints community.

To post feedback, submit feature ideas, or report bugs, please use the Issues section of this GitHub repository.

For architectural details, step-by-step instructions, and customization options, see our documentation under each folder.

If you are interested in contributing to ECS Blueprints, see the Contribution guide.

Contributing

See CONTRIBUTING for more information.

Security

See CONTRIBUTING for more information.

More Repositories

1

taskcat

Test all the CloudFormation things! (with TaskCat)
Python
1,163
star
2

terraform-aws-control_tower_account_factory

AWS Control Tower Account Factory
HCL
417
star
3

terraform-aws-vpc

AWS VPC Module
HCL
87
star
4

terraform-aws-eks-blueprints-addon

Terraform AWS module which creates an EKS addon (helm release + IRSA)
HCL
58
star
5

terraform-aws-ipam

Terraform Module for create AWS IPAM Resources
HCL
50
star
6

terraform-aws-mwaa

Terraform module for Amazon MWAA(Apache Airflow)
HCL
40
star
7

terraform-aws-iam-identity-center

HCL
29
star
8

terraform-aws-network-hubandspoke

HCL
28
star
9

cfn-ecr-aws-soci-index-builder

Go
27
star
10

terraform-repo-template

Terraform Module Template
HCL
26
star
11

terraform-aws-globalnetwork

AWS Global Network Module
HCL
22
star
12

terraform-aws-label

AWS Label Module
HCL
22
star
13

terraform-aws-eks-ack-addons

Terraform AWS module which provisions ACK addons on EKS
HCL
20
star
14

terraform-adobe-magento

Adobe Magento
HCL
19
star
15

cloudformation-github-resource-providers

GitHub CFN Registry resource
TypeScript
18
star
16

terraform-aws-rds-aurora

AWS RDS Aurora Module
HCL
17
star
17

cloudformation-aws-marketplace-saas

AWS Marketplace Build Tools
14
star
18

cfn-ps-apache-superset

HTML
13
star
19

terraform-aws-ecs-fargate

AWS ECS Fargate Module
HCL
13
star
20

terraform-aws-runtask-iam-access-analyzer

HCL
12
star
21

terraform-aws-mendix-private-cloud

This AWS Partner Solution uses Terraform to deploy a Mendix infrastructure in the AWS Cloud.
Smarty
12
star
22

terraform-aws-networkfirewall

Terraform module to deploy AWS Network Firewall
HCL
12
star
23

cfn-ps-linux-bastion

HTML
11
star
24

terraform-aws-codebuild

AWS CodeBuild Module
HCL
10
star
25

cfn-ps-clickhouse-cluster

HTML
10
star
26

standards-terraform

AWS I&A Terraform Module Standards
CSS
10
star
27

copier-terraform-repo-template

Jinja
9
star
28

terraform-aws-cloudwan

AWS Terraform Module for creating AWS CloudWAN
HCL
9
star
29

cloudformation-cloudflare-resource-providers

Cloudflare CFN Registry resource
TypeScript
9
star
30

cfn-ps-aws-vpc

HTML
9
star
31

aws-ia-documentation-base-common

"Docs 2.1" docs-as-code boilerplate
CSS
8
star
32

terraform-aws-ec2-image-builder

Terraform module for EC2 Image Builder
HCL
7
star
33

cloudformation-pagerduty-resource-providers

PagerDuty CFN Registry resource
TypeScript
7
star
34

cloudformation-dynatrace-resource-providers

Dynatrace CFN Registry resource
TypeScript
6
star
35

terraform-hashicorp-cloud_workspace

Terraform Cloud Workspace
HCL
6
star
36

terraform-aws-rds-custom-for-oracle

HCL
6
star
37

terraform-aws-genai-document-ingestion-rag

RAG ingestion pipeline module with Amazon OpenSearch and Bedrock
Python
6
star
38

cfn-ps-amazon-selling-partner-api

HTML
5
star
39

cfn-abi-aws-reference-guide

HTML
5
star
40

cloudformation-snowflake-resource-providers

SnowFlake CFN Registry resource
TypeScript
5
star
41

cfn-ps-hashicorp-nomad

HTML
4
star
42

terraform-aws-tf-cloud-agents

Creates self-hosted Terraform Cloud Agent on AWS (https://registry.terraform.io/modules/aws-ia/tf-cloud-agents/aws/latest)
HCL
4
star
43

cfn-ps-amazon-rds

HTML
4
star
44

terraform-aws-ecs-cluster

AWS ECS
HCL
4
star
45

cfn-ps-git2s3

Python
4
star
46

terraform-awscc-dropshare

Terraform Module to create resources for a Dropshare Connection with AWS S3 and AWS CloudFront.
HCL
4
star
47

terraform-aws-route53-recovery-controller

Terraform Module to deploy Route53 Application Recovery Controller components
HCL
4
star
48

cfn-ps-databricks-unified-data-analytics-platform

HTML
3
star
49

cfn-ps-microfocus-amc-es

TSQL
3
star
50

cfn-ps-duo-mfa

HTML
3
star
51

cfn-ps-datalake-foundation

HTML
3
star
52

cfn-ps-sudo-consultants-serverless-wordpress

HTML
3
star
53

terraform-cloudera-cdp

This Amazon Web Services (AWS) Partner Solution uses a Terraform module to deploy Cloudera Data Platform (CDP) in the AWS Cloud.
HCL
3
star
54

cloudformation-gitlab-resource-providers

GitLab CFN Registry resource
Java
3
star
55

cfn-ps-sumo-logic-cloudsiem

Python
3
star
56

cloudformation-fastly-resource-providers

Fastly CFN Registry resource
TypeScript
3
star
57

cfn-abi-crowdstrike-fcs

Python
3
star
58

cfn-abi-trend-cloudone

Python
3
star
59

cfn-ps-microsoft-iis

HTML
3
star
60

terraform-aws-vpc_endpoints

Terraform AWS VPC endpoints module
Python
3
star
61

cfn-ps-fsx-windows-file-server

HTML
3
star
62

cfn-ps-cisco-asav-ravpn

HTML
3
star
63

cfn-ps-illumina-dragen

HTML
2
star
64

terraform-hashicorp-cts-alb_listener-nia

HCL
2
star
65

cfn-ps-github-enterprise

HTML
2
star
66

cfn-ps-qingcloud-kubesphere

HTML
2
star
67

cfn-ps-freeradius-mfa-workspaces

HTML
2
star
68

cfn-ps-f5-big-ip-virtual-edition-ha

HTML
2
star
69

.github

Org template
2
star
70

cloudformation-newrelic-resource-providers

NewRelic CFN Registry resource
Java
2
star
71

cfn-ps-snyk-security

HTML
2
star
72

cfn-ps-progress-openedge

HTML
2
star
73

cfn-ps-red-hat-rhel-with-ha

Shell
2
star
74

workshop-taskcat

In this workshop, we cover AWS CloudFormation best practices, tips on authoring AAA templates, and hands-on building of a CI/CD pipeline to validate templates before they are published.
CSS
2
star
75

cfn-ps-citrix-daas

PowerShell
1
star
76

cfn-ps-uipath-automation-suite

HTML
1
star
77

cfn-ps-hashicorp-vault

Shell
1
star
78

cfn-ps-ammos-smallsat-toolkit

HTML
1
star
79

cfn-ps-quantiphi-lex-kendra-backend

HTML
1
star
80

cfn-ps-taskcat-ci

HTML
1
star
81

cfn-ps-vesoft-nebula-graph-cloud

HTML
1
star
82

cfn-ps-eks-mulesoft-runtime-fabric

HTML
1
star
83

cfn-ps-starrocks-starrocks

HTML
1
star
84

cfn-ps-trendmicro-deepsecurity

HTML
1
star
85

cfn-ps-compliance-pci-fsbp-remediation

HTML
1
star
86

cfn-ps-microsoft-sql-fci-fsx

HTML
1
star
87

cfn-ps-iridium-cloudconnect-sbd

HTML
1
star
88

cfn-ps-splunk-enterprise

HTML
1
star
89

ecs-consul-mesh-extension

Amazon ECS Hashicorp Consul extension
TypeScript
1
star
90

cloudformation-rollbar-resource-providers

TypeScript
1
star
91

cloudformation-databricks-resource-providers

DataBricks CFN Registry resource
TypeScript
1
star
92

terraform-aws-resiliencehub-app

AWS Resilience Hub via Terraform to manage the resilience of your applications
HCL
1
star
93

cloudformation-bigid-resource-providers

BigID CFN Registry resource
TypeScript
1
star
94

cfn-ps-salesforce-connect-appsync-rds-postgresql

Java
1
star
95

cfn-ps-uipath-robot

HTML
1
star
96

cfn-ps-uipath-orchestrator

HTML
1
star
97

cfn-ps-ct-newrelic-one

HTML
1
star
98

cfn-ps-mongodb-atlas

HTML
1
star
99

cfn-ps-codepipeline-bluegreen-deployment

HTML
1
star
100

cloudformation-okta-resource-providers

Okta CFN Registry resource
TypeScript
1
star