Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
davidchristiansen/LoadBalancedFargateService-ContainerNameAndRoleOver…
Browse files Browse the repository at this point in the history
…rides

Implemenation of execution tests, task role and
container name overrides + tests
DavidChristiansen committed Jun 6, 2019
1 parent 3f7a0ad commit b0fa386
Showing 4 changed files with 854 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ecs = require('@aws-cdk/aws-ecs');
import iam = require('@aws-cdk/aws-iam');
import { AliasRecord, IHostedZone } from '@aws-cdk/aws-route53';
import targets = require('@aws-cdk/aws-route53-targets');
import cdk = require('@aws-cdk/cdk');
@@ -72,6 +73,27 @@ export interface LoadBalancedFargateServiceProps extends LoadBalancedServiceBase
* @default true
*/
readonly createLogs?: boolean;

/**
* Override for the Fargate Task Definition execution role
*
* @default - No value
*/
readonly executionRole?: iam.Role;

/**
* Override for the Fargate Task Definition task role
*
* @default - No value
*/
readonly taskRole?: iam.Role;

/**
* Override value for the container name
*
* @default - No value
*/
readonly containerName?: string;
}

/**
@@ -89,12 +111,16 @@ export class LoadBalancedFargateService extends LoadBalancedServiceBase {

const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef', {
memoryMiB: props.memoryMiB,
cpu: props.cpu
cpu: props.cpu,
executionRole: props.executionRole !== undefined ? props.executionRole : undefined,
taskRole: props.taskRole !== undefined ? props.taskRole : undefined
});

const optIn = props.createLogs !== undefined ? props.createLogs : true;

const container = taskDefinition.addContainer('web', {
const containerName = props.containerName !== undefined ? props.containerName : 'web';

const container = taskDefinition.addContainer(containerName, {
image: props.image,
logging: optIn ? this.createAWSLogDriver(this.node.id) : undefined,
environment: props.environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,704 @@
{
"Resources": {
"Vpc8378EB38": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"EnableDnsHostnames": true,
"EnableDnsSupport": true,
"InstanceTenancy": "default",
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc"
}
]
}
},
"VpcPublicSubnet1Subnet5C2D37C4": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.0.0/18",
"VpcId": {
"Ref": "Vpc8378EB38"
},
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
}
]
}
},
"VpcPublicSubnet1RouteTable6C95E38E": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "Vpc8378EB38"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
}
]
}
},
"VpcPublicSubnet1RouteTableAssociation97140677": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "VpcPublicSubnet1RouteTable6C95E38E"
},
"SubnetId": {
"Ref": "VpcPublicSubnet1Subnet5C2D37C4"
}
}
},
"VpcPublicSubnet1DefaultRoute3DA9E72A": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VpcPublicSubnet1RouteTable6C95E38E"
},
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": {
"Ref": "VpcIGWD7BA715C"
}
},
"DependsOn": [
"VpcVPCGWBF912B6E"
]
},
"VpcPublicSubnet1EIPD7E02669": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc"
}
},
"VpcPublicSubnet1NATGateway4D7517AA": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"AllocationId": {
"Fn::GetAtt": [
"VpcPublicSubnet1EIPD7E02669",
"AllocationId"
]
},
"SubnetId": {
"Ref": "VpcPublicSubnet1Subnet5C2D37C4"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet1"
}
]
}
},
"VpcPublicSubnet2Subnet691E08A3": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.64.0/18",
"VpcId": {
"Ref": "Vpc8378EB38"
},
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": true,
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Public"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Public"
}
]
}
},
"VpcPublicSubnet2RouteTable94F7E489": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "Vpc8378EB38"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
}
]
}
},
"VpcPublicSubnet2RouteTableAssociationDD5762D8": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "VpcPublicSubnet2RouteTable94F7E489"
},
"SubnetId": {
"Ref": "VpcPublicSubnet2Subnet691E08A3"
}
}
},
"VpcPublicSubnet2DefaultRoute97F91067": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VpcPublicSubnet2RouteTable94F7E489"
},
"DestinationCidrBlock": "0.0.0.0/0",
"GatewayId": {
"Ref": "VpcIGWD7BA715C"
}
},
"DependsOn": [
"VpcVPCGWBF912B6E"
]
},
"VpcPublicSubnet2EIP3C605A87": {
"Type": "AWS::EC2::EIP",
"Properties": {
"Domain": "vpc"
}
},
"VpcPublicSubnet2NATGateway9182C01D": {
"Type": "AWS::EC2::NatGateway",
"Properties": {
"AllocationId": {
"Fn::GetAtt": [
"VpcPublicSubnet2EIP3C605A87",
"AllocationId"
]
},
"SubnetId": {
"Ref": "VpcPublicSubnet2Subnet691E08A3"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PublicSubnet2"
}
]
}
},
"VpcPrivateSubnet1Subnet536B997A": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.128.0/18",
"VpcId": {
"Ref": "Vpc8378EB38"
},
"AvailabilityZone": "test-region-1a",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet1"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
}
]
}
},
"VpcPrivateSubnet1RouteTableB2C5B500": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "Vpc8378EB38"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet1"
}
]
}
},
"VpcPrivateSubnet1RouteTableAssociation70C59FA6": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "VpcPrivateSubnet1RouteTableB2C5B500"
},
"SubnetId": {
"Ref": "VpcPrivateSubnet1Subnet536B997A"
}
}
},
"VpcPrivateSubnet1DefaultRouteBE02A9ED": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VpcPrivateSubnet1RouteTableB2C5B500"
},
"DestinationCidrBlock": "0.0.0.0/0",
"NatGatewayId": {
"Ref": "VpcPublicSubnet1NATGateway4D7517AA"
}
}
},
"VpcPrivateSubnet2Subnet3788AAA1": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": "10.0.192.0/18",
"VpcId": {
"Ref": "Vpc8378EB38"
},
"AvailabilityZone": "test-region-1b",
"MapPublicIpOnLaunch": false,
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet2"
},
{
"Key": "aws-cdk:subnet-name",
"Value": "Private"
},
{
"Key": "aws-cdk:subnet-type",
"Value": "Private"
}
]
}
},
"VpcPrivateSubnet2RouteTableA678073B": {
"Type": "AWS::EC2::RouteTable",
"Properties": {
"VpcId": {
"Ref": "Vpc8378EB38"
},
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc/PrivateSubnet2"
}
]
}
},
"VpcPrivateSubnet2RouteTableAssociationA89CAD56": {
"Type": "AWS::EC2::SubnetRouteTableAssociation",
"Properties": {
"RouteTableId": {
"Ref": "VpcPrivateSubnet2RouteTableA678073B"
},
"SubnetId": {
"Ref": "VpcPrivateSubnet2Subnet3788AAA1"
}
}
},
"VpcPrivateSubnet2DefaultRoute060D2087": {
"Type": "AWS::EC2::Route",
"Properties": {
"RouteTableId": {
"Ref": "VpcPrivateSubnet2RouteTableA678073B"
},
"DestinationCidrBlock": "0.0.0.0/0",
"NatGatewayId": {
"Ref": "VpcPublicSubnet2NATGateway9182C01D"
}
}
},
"VpcIGWD7BA715C": {
"Type": "AWS::EC2::InternetGateway",
"Properties": {
"Tags": [
{
"Key": "Name",
"Value": "aws-ecs-integ/Vpc"
}
]
}
},
"VpcVPCGWBF912B6E": {
"Type": "AWS::EC2::VPCGatewayAttachment",
"Properties": {
"VpcId": {
"Ref": "Vpc8378EB38"
},
"InternetGatewayId": {
"Ref": "VpcIGWD7BA715C"
}
}
},
"FargateCluster7CCD5F93": {
"Type": "AWS::ECS::Cluster"
},
"ExecutionRole605A040B": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": [
{
"Fn::Join": [
"",
[
"ecs.",
{
"Ref": "AWS::URLSuffix"
}
]
]
},
{
"Fn::Join": [
"",
[
"ecs-tasks.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
]
}
}
],
"Version": "2012-10-17"
}
}
},
"ExecutionRoleDefaultPolicyA5B92313": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
"L3LoggingLogGroupBD1F02DD",
"Arn"
]
}
}
],
"Version": "2012-10-17"
},
"PolicyName": "ExecutionRoleDefaultPolicyA5B92313",
"Roles": [
{
"Ref": "ExecutionRole605A040B"
}
]
}
},
"L3LB212FC0E0": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"LoadBalancerAttributes": [],
"Scheme": "internet-facing",
"SecurityGroups": [
{
"Fn::GetAtt": [
"L3LBSecurityGroupEDE61198",
"GroupId"
]
}
],
"Subnets": [
{
"Ref": "VpcPublicSubnet1Subnet5C2D37C4"
},
{
"Ref": "VpcPublicSubnet2Subnet691E08A3"
}
],
"Type": "application"
},
"DependsOn": [
"VpcPublicSubnet1DefaultRoute3DA9E72A",
"VpcPublicSubnet2DefaultRoute97F91067"
]
},
"L3LBSecurityGroupEDE61198": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Automatically created Security Group for ELB awsecsintegL3LB6453BA0A",
"SecurityGroupEgress": [],
"SecurityGroupIngress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow from anyone on port 80",
"FromPort": 80,
"IpProtocol": "tcp",
"ToPort": 80
}
],
"VpcId": {
"Ref": "Vpc8378EB38"
}
}
},
"L3LBSecurityGrouptoawsecsintegL3ServiceSecurityGroup7B96C87F8094933E0A": {
"Type": "AWS::EC2::SecurityGroupEgress",
"Properties": {
"GroupId": {
"Fn::GetAtt": [
"L3LBSecurityGroupEDE61198",
"GroupId"
]
},
"IpProtocol": "tcp",
"Description": "Load balancer to target",
"DestinationSecurityGroupId": {
"Fn::GetAtt": [
"L3ServiceSecurityGroup677B0897",
"GroupId"
]
},
"FromPort": 80,
"ToPort": 80
}
},
"L3LBPublicListener156FFC0F": {
"Type": "AWS::ElasticLoadBalancingV2::Listener",
"Properties": {
"DefaultActions": [
{
"TargetGroupArn": {
"Ref": "L3LBPublicListenerECSGroup648EEA11"
},
"Type": "forward"
}
],
"LoadBalancerArn": {
"Ref": "L3LB212FC0E0"
},
"Port": 80,
"Protocol": "HTTP",
"Certificates": []
}
},
"L3LBPublicListenerECSGroup648EEA11": {
"Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
"Properties": {
"Port": 80,
"Protocol": "HTTP",
"TargetGroupAttributes": [],
"Targets": [],
"TargetType": "ip",
"VpcId": {
"Ref": "Vpc8378EB38"
}
}
},
"L3TaskDefTaskRole21C75D10": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": {
"Fn::Join": [
"",
[
"ecs-tasks.",
{
"Ref": "AWS::URLSuffix"
}
]
]
}
}
}
],
"Version": "2012-10-17"
}
}
},
"L3TaskDef48D8ACB8": {
"Type": "AWS::ECS::TaskDefinition",
"Properties": {
"ContainerDefinitions": [
{
"Essential": true,
"Image": "amazon/amazon-ecs-sample",
"Links": [],
"LogConfiguration": {
"LogDriver": "awslogs",
"Options": {
"awslogs-group": {
"Ref": "L3LoggingLogGroupBD1F02DD"
},
"awslogs-stream-prefix": "L3",
"awslogs-region": {
"Ref": "AWS::Region"
}
}
},
"MountPoints": [],
"Name": "web",
"PortMappings": [
{
"ContainerPort": 80,
"Protocol": "tcp"
}
],
"Ulimits": [],
"VolumesFrom": []
}
],
"Cpu": "512",
"ExecutionRoleArn": {
"Fn::GetAtt": [
"ExecutionRole605A040B",
"Arn"
]
},
"Family": "awsecsintegL3TaskDefAA25240E",
"Memory": "1GB",
"NetworkMode": "awsvpc",
"RequiresCompatibilities": [
"FARGATE"
],
"TaskRoleArn": {
"Fn::GetAtt": [
"L3TaskDefTaskRole21C75D10",
"Arn"
]
},
"Volumes": []
}
},
"L3LoggingLogGroupBD1F02DD": {
"Type": "AWS::Logs::LogGroup",
"DeletionPolicy": "Retain"
},
"L3Service616D5A93": {
"Type": "AWS::ECS::Service",
"Properties": {
"TaskDefinition": {
"Ref": "L3TaskDef48D8ACB8"
},
"Cluster": {
"Ref": "FargateCluster7CCD5F93"
},
"DeploymentConfiguration": {
"MaximumPercent": 200,
"MinimumHealthyPercent": 50
},
"DesiredCount": 1,
"LaunchType": "FARGATE",
"LoadBalancers": [
{
"ContainerName": "web",
"ContainerPort": 80,
"TargetGroupArn": {
"Ref": "L3LBPublicListenerECSGroup648EEA11"
}
}
],
"NetworkConfiguration": {
"AwsvpcConfiguration": {
"AssignPublicIp": "DISABLED",
"SecurityGroups": [
{
"Fn::GetAtt": [
"L3ServiceSecurityGroup677B0897",
"GroupId"
]
}
],
"Subnets": [
{
"Ref": "VpcPrivateSubnet1Subnet536B997A"
},
{
"Ref": "VpcPrivateSubnet2Subnet3788AAA1"
}
]
}
},
"ServiceRegistries": []
},
"DependsOn": [
"L3LBPublicListenerECSGroup648EEA11",
"L3LBPublicListener156FFC0F"
]
},
"L3ServiceSecurityGroup677B0897": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "aws-ecs-integ/L3/Service/SecurityGroup",
"SecurityGroupEgress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
}
],
"SecurityGroupIngress": [],
"VpcId": {
"Ref": "Vpc8378EB38"
}
}
},
"L3ServiceSecurityGroupfromawsecsintegL3LBSecurityGroupA70DA46C80DBDFBCD6": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"IpProtocol": "tcp",
"Description": "Load balancer to target",
"FromPort": 80,
"GroupId": {
"Fn::GetAtt": [
"L3ServiceSecurityGroup677B0897",
"GroupId"
]
},
"SourceSecurityGroupId": {
"Fn::GetAtt": [
"L3LBSecurityGroupEDE61198",
"GroupId"
]
},
"ToPort": 80
}
}
},
"Outputs": {
"L3LoadBalancerDNSC6CB4A70": {
"Value": {
"Fn::GetAtt": [
"L3LB212FC0E0",
"DNSName"
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import iam = require('@aws-cdk/aws-iam');
import cdk = require('@aws-cdk/cdk');
import ecsPatterns = require('../../lib');

const app = new cdk.App();
const stack = new cdk.Stack(app, 'aws-ecs-integ');

const vpc = new ec2.Vpc(stack, 'Vpc', { maxAZs: 2 });

const cluster = new ecs.Cluster(stack, 'FargateCluster', { vpc });

new ecsPatterns.LoadBalancedFargateService(stack, 'L3', {
cluster,
memoryMiB: '1GB',
cpu: '512',
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
executionRole: new iam.Role(stack, 'ExecutionRole', {
assumedBy: new iam.CompositePrincipal(
new iam.ServicePrincipal("ecs.amazonaws.com"),
new iam.ServicePrincipal("ecs-tasks.amazonaws.com")
)
})
});

app.run();
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { expect, haveResourceLike } from '@aws-cdk/assert';
import { expect, haveResourceLike, SynthUtils } from '@aws-cdk/assert';
import { Certificate } from '@aws-cdk/aws-certificatemanager';
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import iam = require('@aws-cdk/aws-iam');
import cdk = require('@aws-cdk/cdk');
import { Test } from 'nodeunit';
import ecsPatterns = require('../../lib');
@@ -47,6 +48,99 @@ export = {
Type: 'network'
}));

test.done();
},

'setting executionRole updated taskDefinition with given execution role'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'VPC');
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });
const executionRole = new iam.Role(stack, 'ExecutionRole', {
path: '/',
assumedBy: new iam.CompositePrincipal(
new iam.ServicePrincipal("ecs.amazonaws.com"),
new iam.ServicePrincipal("ecs-tasks.amazonaws.com")
)
});

// WHEN
new ecsPatterns.LoadBalancedFargateService(stack, 'Service', {
cluster,
loadBalancerType: ecsPatterns.LoadBalancerType.Network,
image: ecs.ContainerImage.fromRegistry("/aws/aws-example-app"),
executionRole
});

// THEN
const serviceTaskDefinition = SynthUtils.synthesize(stack).template.Resources.ServiceTaskDef1922A00F;
test.deepEqual(serviceTaskDefinition.Properties.ExecutionRoleArn, { 'Fn::GetAtt': [ 'ExecutionRole605A040B', 'Arn' ] });
test.done();
},

'setting taskRole updated taskDefinition with given task role'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'VPC');
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });
const taskRole = new iam.Role(stack, 'taskRoleTest', {
path: '/',
assumedBy: new iam.CompositePrincipal(
new iam.ServicePrincipal("ecs.amazonaws.com"),
new iam.ServicePrincipal("ecs-tasks.amazonaws.com")
)
});

// WHEN
new ecsPatterns.LoadBalancedFargateService(stack, 'Service', {
cluster,
loadBalancerType: ecsPatterns.LoadBalancerType.Network,
image: ecs.ContainerImage.fromRegistry("/aws/aws-example-app"),
taskRole
});

// THEN
const serviceTaskDefinition = SynthUtils.synthesize(stack).template.Resources.ServiceTaskDef1922A00F;
test.deepEqual(serviceTaskDefinition.Properties.TaskRoleArn, { 'Fn::GetAtt': [ 'taskRoleTest9DA66B6E', 'Arn' ] });
test.done();
},

'setting containerName updates container name with given name'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'VPC');
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });

// WHEN
new ecsPatterns.LoadBalancedFargateService(stack, 'Service', {
cluster,
loadBalancerType: ecsPatterns.LoadBalancerType.Network,
image: ecs.ContainerImage.fromRegistry("/aws/aws-example-app"),
containerName: 'bob'
});

// THEN
const serviceTaskDefinition = SynthUtils.synthesize(stack).template.Resources.ServiceTaskDef1922A00F;
test.deepEqual(serviceTaskDefinition.Properties.ContainerDefinitions[0].Name, 'bob');
test.done();
},

'not setting containerName updates container name with default'(test: Test) {
// GIVEN
const stack = new cdk.Stack();
const vpc = new ec2.Vpc(stack, 'VPC');
const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });

// WHEN
new ecsPatterns.LoadBalancedFargateService(stack, 'Service', {
cluster,
loadBalancerType: ecsPatterns.LoadBalancerType.Network,
image: ecs.ContainerImage.fromRegistry("/aws/aws-example-app"),
});

// THEN
const serviceTaskDefinition = SynthUtils.synthesize(stack).template.Resources.ServiceTaskDef1922A00F;
test.deepEqual(serviceTaskDefinition.Properties.ContainerDefinitions[0].Name, 'web');
test.done();
}
};

0 comments on commit b0fa386

Please sign in to comment.