aws-fargate

STOPPED (CannotPullContainerError: API error (500)?

孤者浪人 提交于 2019-12-06 17:26:58
问题 I'm getting this error when running a task on my Amazon Fargate cluster. Has anyone seen run into this before? 回答1: Public IP is mandatory for Farget. For details https://github.com/aws/amazon-ecs-agent/issues/1128 回答2: Go to the docs for an answer to this one. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html Since you are encountering a 500 error, I would heed the advice of the first error's description, "Connection timed out": When a Fargate task is

How to debug failed fargate task initialization

微笑、不失礼 提交于 2019-12-06 00:54:40
问题 I have a fargate task which I have scheduled to run with CloudWatch Event rules, and output a timestamp to a database on a successful run. It also outputs a logfile to CloudWatch for every time it runs. However, there was 1 time where the log file was not created, and the database not updated. I suspect the task was never even started, or had failed to start. In CloudWatch, the event rule shows trigger and invocation at the time I expected the task to run, so I assume the task at least

What vCPUs in Fargate really mean?

ぃ、小莉子 提交于 2019-12-05 01:18:04
I was trying to get answers on my question here and here , but I understood that I need to know specifically Fargate implementation of vCPUs. So my question is: If I allocate 4 vCPUs to my task does that mean that my single-threaded app running on a container in this task will be able to fully use all this vCPUs as they are essentially only a portion of time of the processor's core that I can use? Let's say, I assigned 4vCPUs to my task, but on a technical level I assigned 4vCPUs to a physical core that can freely process one thread (or even more with hyperthreading). Is my logic correct for

STOPPED (CannotPullContainerError: API error (500)?

时光毁灭记忆、已成空白 提交于 2019-12-04 23:09:36
I'm getting this error when running a task on my Amazon Fargate cluster. Has anyone seen run into this before? Public IP is mandatory for Farget. For details https://github.com/aws/amazon-ecs-agent/issues/1128 Go to the docs for an answer to this one. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_cannot_pull_image.html Since you are encountering a 500 error, I would heed the advice of the first error's description, "Connection timed out": When a Fargate task is launched, its elastic network interface requires a route to the internet to pull container images. If you receive

Is it possible to SSH into FARGATE managed container instances?

浪尽此生 提交于 2019-12-04 22:44:05
I use to connect to EC2 container instances following this steps, https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance-connect.html wondering how I can connect to FARGATE-managed container instances instead. Looking on that issue on github https://github.com/aws/amazon-ecs-cli/issues/143 I think it's not possible to make docker exec from remote host into container on ECS Fargate. You can try to run ssh daemon and your main process in one container using e.g. systemd ( https://docs.docker.com/config/containers/multi-service_container/ ) and connect to your container using SSH

How to debug failed fargate task initialization

梦想与她 提交于 2019-12-04 09:19:41
I have a fargate task which I have scheduled to run with CloudWatch Event rules, and output a timestamp to a database on a successful run. It also outputs a logfile to CloudWatch for every time it runs. However, there was 1 time where the log file was not created, and the database not updated. I suspect the task was never even started, or had failed to start. In CloudWatch, the event rule shows trigger and invocation at the time I expected the task to run, so I assume the task at least attempted to start. My question is: is there any way I can debug or log information about the cluster failing

How do I associate an Elastic IP with a Fargate container?

梦想的初衷 提交于 2019-12-03 17:52:30
问题 I'm exploring using the new Fargate option for my ECS containers. One constraint is that the running task must always be accessible at the same Public IP address. My first thought was to allocate an Elastic IP but I can't tell what to associate it to. It seems an Elastic IP can be associated to an instance (which is irrelevant for Fargate) or a Network Interface. However, if I associate it with an ENI, I can't see how to ensure my task's container has that Network Interface. When creating a

Can't access S3 bucket from within Fargate container (Bad Request and unable to locate credentials)

試著忘記壹切 提交于 2019-12-03 14:42:49
问题 I created a private s3 bucket and a fargate cluster with a simple task that attempts to read from that bucket using python 3 and boto3 . I've tried this on 2 different docker images and on one I get a ClientError from boto saying HeadObject Bad request (400) and the other I get NoCredentialsError: Unable to locate credentials . The only real different in the images is that the one saying bad request is being run normally and the other is being run manually by me via ssh to the task container.

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

混江龙づ霸主 提交于 2019-12-03 13:12:20
问题 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: AssignPublicIp: !Ref PublicIpAssignment SecurityGroups: - !Ref EcsSecurityGroups Subnets: - !Ref SubnetName TaskCount: 1 TaskDefinitionArn: !Ref TaskDefinitionOne My ECS CLuster is launched on Fargate and not EC2, and I do NOT have a service running (use case doesn't need a long

How do I associate an Elastic IP with a Fargate container?

房东的猫 提交于 2019-12-03 05:48:53
I'm exploring using the new Fargate option for my ECS containers. One constraint is that the running task must always be accessible at the same Public IP address. My first thought was to allocate an Elastic IP but I can't tell what to associate it to. It seems an Elastic IP can be associated to an instance (which is irrelevant for Fargate) or a Network Interface. However, if I associate it with an ENI, I can't see how to ensure my task's container has that Network Interface. When creating a Service, I see that I can put it in a VPC, but that's it. From experimentation, if I kill a task so that