Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Fargate LoadBalance Service examples #126

Merged
merged 2 commits into from
Sep 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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