Questions tagged [ecs-taskdefinition]

94 questions
0
votes
0 answers

Initialise mongodb container in ECS task definition with ansible

I have deployed and initialised locally a mongo container with docker-compose: services: mongo-db: image: mongo:latest restart: always environment: MONGO_INITDB_ROOT_USERNAME: '${DB_USER}' MONGO_INITDB_ROOT_PASSWORD:…
Domenico
  • 29
  • 6
0
votes
1 answer

How to pass Pulumi's Output to the container definition of a task within ecs?

A containerDefinition within a Task Definition needs to be provided as a single valid JSON document. I'm creating a generic ECS service that should handle dynamic data. Here is the code: genericClientService(environment: string, targetGroupArn:…
juju
  • 316
  • 1
  • 3
  • 11
0
votes
1 answer

ECS (EC2 type) task is failing container health check, but ALB health check works

I have ECS cluster (EC2 type, 1 service only) with ALB and Target Group. Desired count is set to 2 on ECS service level, no ASG for tasks. Technically everything works. I can communicate with my API without any problem, but there is a small issue…
0
votes
0 answers

AWS ECS Task Slow Processing

I am using AWS to deploy my python project by using docker. I choosed FARGATE for task definition and Task Memory is 512, Task CPU is 256. There is a process that takes too much time on AWS. It takes 1 second on my PC(i7-6700HQ and 16.0 GB ram) and…
0
votes
1 answer

Dependency among different ecs tasks

I have developed a backend server using multiple microservices, using spring cloud. I have discovery service, config service, and different other services. Right now for testing purposes, I use docker-compose to run them in the right order. Now I…
Kumar Gaurav
  • 1,287
  • 3
  • 19
  • 47
0
votes
1 answer

How can i fix this error message on ECS "STOPPED (VolumeError: Agent could not create task's volume resources)"

I am trying to update my ECS cluster by starting a new task but I keep having this message STOPPED (VolumeError: Agent could not create task's volume resources). Anybody has an idea of what does it mean? or how can I debug this ?
0
votes
1 answer

Docker container in ECS Fargate exits with code 0 when running script. Unable to run container to get to /bin/sh

I have an ECS Cluster that is using an image hosted in AWS ECR. The dockerfile is executing a script in it's entrypoint attribute. My cluster is able to spin up instances but then goes into a stopped state. The only error it is giving me is as…
Dave Michaels
  • 847
  • 1
  • 19
  • 51
0
votes
1 answer

starting container process caused: exec: "[\"/bin/sh -c\"": stat ["/bin/sh -c": no such file or directory

I am building and deploying an application via Docker and ECS Fargate. I have my entrypoint command defined in the ECS Task definition. Upon pushing the image into a private ECR repository, I am getting this error when ECS Fargate attempts to deploy…
Dave Michaels
  • 847
  • 1
  • 19
  • 51
0
votes
2 answers

Using file function with Terraform workspace

I have a resource that am creating in Terraform. Within the resource there is an attribute that is using JSON file to read in values. I am reading in these values from a separate JSON file and want to declare the attribute in conjunction with my…
0
votes
0 answers

How do I create a revision of a deregistered/inactive task definition in AWS ECS through AWS CLI command?

I need to bring back a deregistered / inactive task definition in ECS by creating a revision of the inactive task definition. I can do this manually through the AWS ECS console. How can this be done by using AWS CLI command line ?
0
votes
1 answer

CloudFormation TaskDefinition with two different entry points based on condition

I have to add taskdefintion entry based on condition. Below is the template i created. Conditions IsProdEnv: !Equals [ !Ref envtype, "prod" ] TaskDefinition: Type: AWS::ECS::TaskDefinition Properties: ContainerDefinitions: …
wlg
  • 159
  • 1
  • 10
0
votes
1 answer

Avoid replacement of TaskDefinition with CloudFormation

I'm automating a PR process that need to create stacks through cloudformation. The problem is that, by definition https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html the old TaskDefinition revision is…
Rafael
  • 104
  • 8
0
votes
1 answer

AWS cdk Fargate task definition with python - how to use add_container(secrets=[Mapping[str, Secret]])?

I'm writing AWS Fargate task definition in python as in https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_ecs/FargateTaskDefinition.html?highlight=fargatetaskdefinition I'd like to add database secrets to Fargate, but I got confused on…
Joe
  • 393
  • 1
  • 2
  • 11
0
votes
1 answer

Can I replace the default "502 Bad Gateway" page while AWS ECS containers are being rebuilt?

I have an ECS cluster with a handful of containers. My build pipeline is set to automatically pick up new changes when they are pushed to ECR. This works great, and while the new task is deploying new containers, all my load balancers - which…
0
votes
2 answers

How do I add Linux capabilities SYS_NICE and DAC_READ_SEARCH to container in AWS Fargate?

I'm trying to setup a task definition in ECS Fargate for running Koha containers but Fargate won't accept --cap-add=SYS_NICE --cap-add=DAC_READ_SEARCH (or any other kernel capabilities except for SYS_PTRACE) in the task definition json file. I tried…