Skip to content

Commit

Permalink
fix: Update Fargate LoadBalance Service examples (aws-samples#126)
Browse files Browse the repository at this point in the history
Update Fargate load balanced service example for TypeScript and Python based on aws/aws-cdk#3719.
  • Loading branch information
garnaat authored and rix0rrr committed Sep 18, 2019
1 parent a917771 commit 26251ab
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/ecs/ecs-load-balanced-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
cluster.add_capacity("DefaultAutoScalingGroup",
instance_type=ec2.InstanceType("t2.micro"))

ecs_service = ecs_patterns.LoadBalancedEc2Service(
ecs_service = ecs_patterns.NetworkLoadBalancedEc2Service(
self, "Ec2Service",
cluster=cluster,
memory_limit_mib=512,
Expand Down
2 changes: 1 addition & 1 deletion python/ecs/fargate-load-balanced-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
vpc=vpc
)

fargate_service = ecs_patterns.LoadBalancedFargateService(
fargate_service = ecs_patterns.NetworkLoadBalancedFargateService(
self, "FargateService",
cluster=cluster,
image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
Expand Down
2 changes: 1 addition & 1 deletion python/ecs/fargate-service-with-autoscaling/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
)

# Create Fargate Service
fargate_service = ecs_patterns.LoadBalancedFargateService(
fargate_service = ecs_patterns.NetworkLoadBalancedFargateService(
self, "sample-app",
cluster=cluster,
image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/ecs-load-balanced-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BonjourECS extends cdk.Stack {
});

// Instantiate ECS Service with just cluster and image
const ecsService = new ecs_patterns.LoadBalancedEc2Service(this, "Ec2Service", {
const ecsService = new ecs_patterns.NetworkLoadBalancedEc2Service(this, "Ec2Service", {
cluster,
memoryLimitMiB: 512,
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-load-balanced-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BonjourFargate extends cdk.Stack {
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });

// Instantiate Fargate Service with just cluster and image
const fargateService = new ecs_patterns.LoadBalancedFargateService(this, "FargateService", {
const fargateService = new ecs_patterns.NetworkLoadBalancedFargateService(this, "FargateService", {
cluster,
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample"),
});
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-service-with-auto-scaling/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AutoScalingFargateService extends cdk.Stack {
const cluster = new ecs.Cluster(this, 'fargate-service-autoscaling', { vpc });

// Create Fargate Service
const fargateService = new ecs_patterns.LoadBalancedFargateService(this, 'sample-app', {
const fargateService = new ecs_patterns.NetworkLoadBalancedFargateService(this, 'sample-app', {
cluster,
image: ecs.ContainerImage.fromRegistry("amazon/amazon-ecs-sample")
});
Expand Down
2 changes: 1 addition & 1 deletion typescript/ecs/fargate-service-with-local-image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const cluster = new ecs.Cluster(stack, 'Cluster', { vpc });
// uploaded to an S3 staging bucket prior to being uploaded to ECR.
// A new repository is created in ECR and the Fargate service is created
// with the image from ECR.
new ecs_patterns.LoadBalancedFargateService(stack, "FargateService", {
new ecs_patterns.NetworkLoadBalancedFargateService(stack, "FargateService", {
cluster,
image: ecs.ContainerImage.fromAsset(path.resolve(__dirname, 'local-image'))
});
Expand Down

0 comments on commit 26251ab

Please sign in to comment.