aws-fargate

ECS Fargate task not applying role

 ̄綄美尐妖づ 提交于 2020-07-09 08:28:41
问题 I have an ECS Fargate task running that has a role attached to it. This role has the S3FullAccess policy (and AssumeRole trusted partnership with ECS service). However when trying to put an object into a bucket, I get Access Denied errors. I have tried booting an EC2 instance and attaching the same role and can put to the bucket without issue. To me it seems like the role is not being attached to the task. Is there an important step I'm missing? I can't SSH into the instance as it's Fargate.

Pass arguments to Python running in Docker container on AWS Fargate

為{幸葍}努か 提交于 2020-05-29 05:12:08
问题 Passing arguments to a Docker container running a Python script can be done like so docker run my_script:0.1 --arg1 val --arg2 val ... I can't seem to figure out how to pass those arguments when running the container on AWS Fargate (perhaps it doesn't work?) 回答1: You can use container definitions parameters in ECS task definition to pass runtime arguments. Command parameter maps to COMMAND parameter in docker run. "command": [ "--arg1", "val", "--arg2", "val" ], It is also possible to pass

Operating the Celery Worker in the ECS Fargate

荒凉一梦 提交于 2020-05-27 04:34:27
问题 I am working on a project using AWS ECS. I want to use Celery as a distributed task queue. Celery Worker can be build up as EC2 type, but because of the large amount of time that the instance is in the idle state, I think it would be cost-effective for AWS Fargate to run the job and quit immediately. Do you have suggestions on how to use the Celery Worker efficiently in the AWS cloud? 回答1: Fargate launch type is going to take longer to spin up than EC2 launch type, because AWS is doing all

Operating the Celery Worker in the ECS Fargate

别等时光非礼了梦想. 提交于 2020-05-27 04:31:52
问题 I am working on a project using AWS ECS. I want to use Celery as a distributed task queue. Celery Worker can be build up as EC2 type, but because of the large amount of time that the instance is in the idle state, I think it would be cost-effective for AWS Fargate to run the job and quit immediately. Do you have suggestions on how to use the Celery Worker efficiently in the AWS cloud? 回答1: Fargate launch type is going to take longer to spin up than EC2 launch type, because AWS is doing all

Aws ecs fargate ResourceInitializationError: unable to pull secrets or registry auth

人盡茶涼 提交于 2020-05-14 19:48:07
问题 I am trying to run a private repository on aws-ecs-fargate-1.4.0 platform. For private repository authentication, I have followed the docs and it was working well. Somehow after updating existing service many times it goes fail to run the task and complain the error like ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to get registry auth from asm: service call has been retried 1 time(s): asm fetching secret from the service

File can be uploaded to S3 locally but can't within a container (Unable to locate credential)

早过忘川 提交于 2020-04-18 01:09:30
问题 I have a Python script to upload a file to S3, the code is the same in this question. I have a bash script that pass the AWS credential. The file I wanted to upload is generated from a model that running on Fargate (ina container), so I tried to run this Python script within the container to upload to S3, I've built the image, but when I run docker run containername it will give me error: INFO:root:Uploading to S3 from test.csv to bucket_name test.csv File "/usr/local/lib/python3.6/dist

File can be uploaded to S3 locally but can't within a container (Unable to locate credential)

纵饮孤独 提交于 2020-04-18 01:08:32
问题 I have a Python script to upload a file to S3, the code is the same in this question. I have a bash script that pass the AWS credential. The file I wanted to upload is generated from a model that running on Fargate (ina container), so I tried to run this Python script within the container to upload to S3, I've built the image, but when I run docker run containername it will give me error: INFO:root:Uploading to S3 from test.csv to bucket_name test.csv File "/usr/local/lib/python3.6/dist

Fargate vs Lambda, when to use which?

半世苍凉 提交于 2020-03-13 07:01:07
问题 I'm pretty new to the whole Serverless landscape, and am trying to wrap my head around when to use Fargate vs Lambda. I am aware that Fargate is a serverless subset of ECS, and Lambda is serverless as well but driven by events. But I'd like to be able to explain the two paradigms in simple terms to other folks that are familiar with containers but not that much with AWS and serverless. Currently we have a couple of physical servers in charge of receiving text files, parsing them out, and

ECS multiple tasks of same service behaviour for scheduler

旧街凉风 提交于 2020-01-06 07:58:12
问题 I have spring boot application. Multiple Fargate tasks of same service is running. Now I have scheduler performed in service. So is scheduler will be performed twice as 2 tasks are running? How it behaves? 回答1: Yes. If the tasks are the same, and you expect each task to execute some work on a schedule, both will run the scheduled work. 来源: https://stackoverflow.com/questions/54333616/ecs-multiple-tasks-of-same-service-behaviour-for-scheduler

NLB Target Group TCP HealthChecks

牧云@^-^@ 提交于 2019-12-25 17:57:09
问题 We are using ECS Farget container service for our ruby on rails containers. We have implemented NLB with HTTP health checks in the target group but as we know that "NLB Target Group health checks are out of control". This is consuming our CPU of each container up to 8% so we are thinking of to migrate HTTP HealthChecks to TCP HealthChecks. Can anyone comment on how TCP HealthCheck works??? Does it only connects to port for a health check or it's actually hit the API? Ref: NLB Target Group