Skip to content

Instantly share code, notes, and snippets.

Created December 22, 2019 15:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
#!/usr/bin/env node
import 'source-map-support/register';
import cdk = require('@aws-cdk/core');
import ecs = require("@aws-cdk/aws-ecs");
import ecsPatterns = require("@aws-cdk/aws-ecs-patterns");
export class WebStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
createECSCluster() {
const ecsCluster = new ecs.Cluster(this, 'ecsCluster');
new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', {
cluster: ecsCluster,
taskImageOptions: {
image: ecs.ContainerImage.fromAsset('.')
const app = new cdk.App();
new WebStack(app, 'WebStack');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment