Questions tagged [aws-fargate]

AWS Fargate is a service within Amazon Web Services that allows for running containers without managing servers or clusters. Use this tag for questions about AWS Fargate. For context, also tag your question with [amazon-ecs] or [amazon-eks] to denote which managed container service you're using.

AWS Fargate is a compute engine for deploying and managing containers without having to manage any of the underlying infrastructure (servers or clusters). AWS Fargate supports Amazon ECS and Amazon EKS.

Usage guidance

Use this tag for questions about AWS Fargate. For context, also tag your question with or to denote which managed container service you're using.

Resources

1725 questions
12
votes
2 answers

Temporarily Stop/Deactivate ECS Fargate cluster or service

This is almost the same question as this one, but for Fargate. I can't find any way to just stop the cluster or the Fargate service temporarily without having to delete it or changing its task definition. Tried to stop each task individually but…
Marco Medrano
  • 2,530
  • 1
  • 21
  • 35
11
votes
2 answers

ECS Fargate does not support bind mounts

I am trying to deploy a nodejs docker-compose app into aws ecs, here is how my docker compose file looks - version: '3.8' services: sampleapp: image: jeetawt/njs-backend build: context: . ports: - 3000:3000 environment: -…
Jeet
  • 5,569
  • 8
  • 43
  • 75
11
votes
1 answer

How to see Python print statements from running Fargate ECS task?

I have a Fargate ECS container that I use to run a Docker container through tasks in ECS. When the task starts, an sh script is called, runner.sh, #!/bin/sh echo "this line will get logged to ECS..." python3 src/my_python_script.py # however print…
Benjamin
  • 683
  • 1
  • 8
  • 22
11
votes
3 answers

How to fix intermittent 503 Service Unavailable after idling/redeployments on AWS HTTP API Gateway & Fargate/ECS?

We've got a quite simple setup which causes us major headaches: HTTP API Gateway with a S3 Integration for our static HTML/JS and a ANY /api/{proxy+} route to a Fargate Service/Tasks accessible via Cloud Map ECS Cluster with a "API service" using…
bentolor
  • 3,126
  • 2
  • 22
  • 33
11
votes
3 answers

How can I increase the disk space in AWS Fargate container?

I am deploying containers via AWS Fargate but I am running into "No Space left on device". Is there a way I can specify the volume size in task_definitions: task_size: mem_limit: 2GB cpu_limit: 256
user_dev
  • 1,357
  • 3
  • 20
  • 46
11
votes
3 answers

creating a 'Target' for a cloudwatch event rule via cloudformation for a fargate launchtype task

I'm trying to create a scheduled task (CloudWatch Events Rule) in my CloudFormation Template that would have the following EcsParameters: EcsParameters: LaunchType: FARGATE NetworkConfiguration: AwsVpcConfiguration: …
tanvi
  • 568
  • 2
  • 11
  • 32
11
votes
1 answer

How to determine the Cloudwatch log stream for a Fargate service?

I've got a Fargate service running, and can view its Cloudwatch log streams using the AWS console (navigate to the service, and click on its Logs tab). I'm looking at the AWS documentation for GetLogEvents and see that you can access the logs using…
Alan
  • 3,715
  • 3
  • 39
  • 57
11
votes
4 answers

How to configure hostname in ECS Fargate task definition

We are migrating from ECS to Fargate. In ECS, we could set the hostname in the task definition like this: "hostname": "%HOST_NAME%" It fails to create with the error 'hostname is not supported on container when networkMode=awsvpc' Is there any way…
Sunil Shakya
  • 8,097
  • 2
  • 17
  • 20
11
votes
5 answers

UnknownHostException from java application running in AWS ECS docker container on Fargate cluster

I have a large Java application I'm trying to run on a fargate cluster in AWS. The image runs successfully on my local machine's docker. When I run it in fargate it starts successfully, but eventually encounters the following error after which the…
Daniel McHenry
  • 305
  • 2
  • 9
10
votes
1 answer

EFS mount on ECS Fargate - Read/write permissions denied for non root user

I have an ECS Fargate container running a nodejs application with non-root permissions and is also mounted to EFS on /.user_data inside the container. I followed this AWS tutorial. My setup is almost similar. Here is the Docker file: FROM…
boyfromnorth
  • 958
  • 4
  • 19
  • 41
10
votes
3 answers

How to provide a config file to a Fargate Task?

What is the easiest way to provide one or several external configuration file(s) to an app running as an AWS Fargate task? The files cannot be part of the Docker image because they depend on the stage environment and may contain secrets. Creating…
Tim van Beek
  • 175
  • 1
  • 12
10
votes
1 answer

Fargate Metrics data is Missing

I have my ecs cluster running and in the metrics section the 4 metrics is coming i.e CPUUtilization, MemoryUtilization, CPUReservation, MemoryReservation but all the metrics is empty even when I select 4 months. I have running many Scheduled Tasks…
user12417145
  • 439
  • 1
  • 6
  • 12
10
votes
3 answers

Looking for a good way to monitor ECS deploy failure notification?

I am deploying services to ECS fargate behind ALB. During deployment, ALB sends health check to the service and if there are 3 consecutive failure health checks, ECS will destroy the new deployed service and keep the old version of the container. I…
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523
10
votes
2 answers

AWS Fargate vs Batch vs ECS for a once a day batch process

I have a batch process, written in PHP and embedded in a Docker container. Basically, it loads data from several webservices, do some computation on data (during ~1h), and post computed data to an other webservice, then the container exit (with a…
JayMore
  • 642
  • 6
  • 20
10
votes
1 answer

Building a secure HTTPS web server with Fargate + ACM + ALB

I am trying for the simplest deploy to get an HTTPS web server up and running in Fargate. I have used Amazon Certificate Manager to create a public certificate. I have an Application Load Balancer that is talking to the Fargate container on two…