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
7
votes
3 answers

AWS Fargate hostname not doable?

I am trying to set up a simple app. It is dragged from https://budgetapp.docsapp.io/ and meant to be working somewhere in public. My task is to deploy it in most automate way and expose metrics of java machine to the public (remote…
7
votes
4 answers

AWS Fargate Task Debugging, what does "CannotPullContainerError ... invalid reference format" mean?

I have docker container stored on AWS ECR, using this container I have created Task . When I run Task over Fargate , the service moves from PROVISIONING > PENDING (red color) > STOPPED states . There is no log either in Service Event , or CloudWatch…
6
votes
2 answers

ECS Fargate task fails: CannotPullContainerError: inspect image has been retried 5 time(s): httpReaderSeeker: failed open: unexpected status code

We have other ECS Services running which use images from our private ECR repo. However for our Services in the same cluster which are trying to pull from Docker Hub we are getting the following error: CannotPullContainerError: inspect image has…
richflow
  • 1,902
  • 3
  • 14
  • 21
6
votes
1 answer

Using secrets from AWS Secrets Manager in a CDK stack using ECS + Fargate

I have defined a CDK app stack using TypeScript (sensitive information rendomized in the code below): import * as cdk from "@aws-cdk/core"; import * as ec2 from "@aws-cdk/aws-ec2"; import * as ecs from "@aws-cdk/aws-ecs"; import * as ecr from…
6
votes
2 answers

Are there any Env variables automatically set on fargate tasks

I’d like to be able to detect if my code is running on a fargate task (as opposed to on an EC2 instance) and it would be ideal if I could get the fargate task ID from an env var. I would then use this info for logging and config. Many CI…
Tom Harvey
  • 3,681
  • 3
  • 19
  • 28
6
votes
2 answers

Ulimits on AWS ECS Fargate

The default ULIMIT "NOFILE" is set to 1024 for containers launched using Fargate. So if I have a cluster of let's say 10 services with two or three tasks each (all running on Fargate), what are the implications if I set them all to use a huge NOFILE…
Tom
  • 61
  • 1
  • 2
6
votes
2 answers

ECS service desire count get resets by Auto Scaling

I want to stop my ECS Fargate test environment everyday, the best option to me is just to modify the ECS Service to have a desire count to zero as follows aws ecs update-service --cluster COOL --service blablabla --desired-count 0, so any task…
farp332
  • 728
  • 2
  • 12
  • 31
6
votes
2 answers

How does a Node.js process behave in AWS Fargate?

I have a Node app deployed on AWS Fargate on the 1 vCPU/2GB memory task config. I have been wondering what's the behavior that Node.js has when running on this setup in relationship to the vCPUs that are available. According to AWS docs, the vCPU is…
6
votes
2 answers

AWS question - How can I get Cloudwatch event data in a Fargate task with Python

I'm new to Cloudwatch events and to Fargate. I want to trigger a Fargate task (Python) to run whenever a file is uploaded to a specific S3 bucket. I can get the task to run whenever I upload a file, and can see the name in the event log; however I…
6
votes
3 answers

ECS FARGATE TASK definition with docker hub image

I want to use phpmyadmin public image from docker hub and configure ECS fargate task .But not sure how to simply put docker pull phpmyadmin command in ECS task definition. Is there an option to do it directly from docker hub public repo? or should…
6
votes
5 answers

How to put multiline commands in ECS Task definition

I am trying to run a django application inside of a docker container (ECS - Fargate) However, I am having trouble figuring out how to run multiple commands in the Command section of a task definition, currently it is configured like this Howevery…
6
votes
1 answer

AWS ECS fargate task stopping and restarting somewhat randomnly

One of my ECS fargate tasks is stopping and restarting in what seems to be a somewhat random fashion. I started the task in Dec 2019 and it has stopped/restarted three times since then. I've found that the task stopped and restarted from its…
Strokes
  • 157
  • 7
  • 23
6
votes
2 answers

How to not rebuild a DockerImageAsset at every deploy using aws-cdk in TypeScript?

My app is a Python API that I package as a Docker image and use with ECS Fargate (Spot Instances). The code below works. My issue is that it rebuilds the entire image every time I deploy this – which is very time-consuming (downloads all…
Lazhar
  • 1,401
  • 16
  • 37
6
votes
0 answers

Replicating Heroku's Review Apps on AWS

I'm currently working for a client that are using Heroku and migrating to AWS. However, we're having trouble in understanding how the Review Apps feature can be replicated in AWS. Specifically, we want a Jenkins job that will allow us to specify a…
Adam Colvin
  • 751
  • 1
  • 6
  • 16
6
votes
1 answer

How 2 services can talk to each other on AWS Fargate?

I setup a Fargate cluster on AWS. My cluster has the following services: server-A (port 3000) server-B (port 4000) Each service is in the same VPC and have the same security group (any ports, any source, any destination). The VPC is isolated from…
JLavoie
  • 16,678
  • 8
  • 33
  • 39