Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] ecs.FargateService should accept array of subnets

See original GitHub issue

It would be nice if we can pass existing subnets to a FargateServiceProps. Our SecOps prevents us from creating subnets ad-hoc, thus we cannot use ecs.FargateService construct. Thanks!

const service = new ecs.FargateService(this, "FargateService", {
    cluster: cluster,
    taskDefinition: fargateTaskDefinition,
    desiredCount: 1,
    securityGroup: sg

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

rix0rrrcommented, Mar 5, 2019

@allankp Cluster.import does not take an IVpcNetwork, it takes VpcNetworkImportProps. Correct code:

 const cluster = ecs.Cluster.import(this, 'Cluster', {
            clusterName: "cluster_name",
            vpc: {
              vpcId: 'vpc-xxxxx',
              availabilityZones: ['eu-west-1a', 'eu-west-1b'],
              privateSubnetIds: ['subnet-xxxxx', 'subnet-xxxx'],
            securityGroups: [{securityGroupId: 'securityGroupId'}]
robertdcommented, Mar 5, 2019

@allankp Same here. The only way I was able to populate subnets was using this in cluster construct.

            vpc: {
              vpcId: 'vpc-xxxxx',
              availabilityZones: ['eu-west-1a', 'eu-west-1b'],
              privateSubnetIds: ['subnet-xxxxx', 'subnet-xxxx'],
Read more comments on GitHub >

github_iconTop Results From Across the Web

Service definition parameters - Amazon Elastic Container ...
A service definition defines how to run your Amazon ECS service. The following parameters can be specified in a service definition.
Read more >
update-service — AWS CLI 2.9.9 Command Reference
When you update any of these parameters, Amazon ECS starts new tasks with the new ... All specified subnets and security groups must...
Read more >
AWS CDK subnet selections - Stack Overflow
I am working on AWS CDK to create load balancer. I am familiar with CloudFormation. During creation of Load Balancer I want to...
Read more >
umotif-public/ecs-fargate/aws - Terraform Registry
aws. Terraform module to create AWS ECS FARGATE services ... ECS Fargate Service ... This is a list of maps, where each map...
Read more >
Recipe for Resilient Engineers: AWS Fargate, ECS, Docker ...
Create the EC2 VPC with private/public subnets, route tables, public-facing ALB, and NAT gateways. Be sure to change the s3-bucket and s3-prefix parameter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found