aws-ecs

AWS Fargate Task Debugging, what does “CannotPullContainerError … invalid reference format” mean?

和自甴很熟 提交于 2021-02-08 14:04:23
问题 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 . Absolutely no way to know what is the real problem . Any idea which way to move, AWS document did not helped. 回答1: I saw this error also. In my case the problem was that I had an invalid image value in my container definition. The image is

How to get Task ID from within ECS container?

房东的猫 提交于 2020-08-27 03:12:31
问题 Hello I am interested in retrieving the Task ID from within inside a running container which lives inside of a EC2 host machine. AWS ECS documentation states there is an environment variable ECS_CONTAINER_METADATA_FILE with the location of this data but will only be set/available if ECS_ENABLE_CONTAINER_METADATA variable is set to true upon cluster/EC2 instance creation. I don't see where this can be done in the aws console. Also, the docs state that this can be done by setting this to true

Does using more vCPUs helps node.js with performance?

一笑奈何 提交于 2019-12-24 16:57:18
问题 I am running node.js inside of a docker container on AWS ECS. I have one process. Does adding more vCPU in general and specifically in case of using AWS ECS makes performance of my app better? Cause if I run 4 vCPUs I see CPUUtilisation is much lower than with 1 vCPU but it doesn't guarantee than this spare CPU will ever be used. And how vCPU is different from physical CPU? 回答1: awesomeness of using container is you can create an identical container within seconds so you don't need to put

Running an ECS Task on a Schedule With .NET

蹲街弑〆低调 提交于 2019-12-24 10:59:53
问题 I am currently using the IAmazonECS.RunTaskAsync API to run a task on ECS immediately. Now, I would like to postpone it to some point in the future. According to the documentation, it should be possible, but I haven't found a way to do it. 回答1: You can use CloudWatchEvents from Amazon.CloudWatchEvents namespace for that. var putRuleRequest = new PutRuleRequest { Name = "test", RoleArn = "IAM_ROLE_ARN", ScheduleExpression = "rate(5 minutes)", State = RuleState.ENABLED, }; var putRuleResponse =

How is a batch processing system in AWS ECS different from AWS Batch?

丶灬走出姿态 提交于 2019-12-24 08:57:51
问题 I have a batch processing system which runs for 5 hours daily on a fixed time. With AWS Batch, I could schedule the job which creates the required EC2 instances to do the job and terminate back the instances.But with ECS, can i launch and terminate the EC2 instance automatically as per my requirement? 回答1: This automatic downscaling can be done using AWS Batch as long as you create the Compute Environment as a Managed Compute Environment instead of unmanaged. However, using Tasks in ECS means

Mount S3 bucket as filesystem on AWS ECS container

依然范特西╮ 提交于 2019-12-24 04:44:04
问题 I am trying to mount S3 as a volume on AWS ECS docker container using rexray/s3fs driver. I am able to do this on my local machine, where I installed plugin $docker plugin install rexray/s3fs and mounted S3 bucket on docker container. $docker plugin ls ID NAME DESCRIPTION ENABLED 3a0e14cadc17 rexray/s3fs:latest REX-Ray FUSE Driver for Amazon Simple Storage true $docker run -ti --volume-driver=rexray/s3fs -v s3-bucket:/data img I am trying replicate this on AWS ECS. Tried follow below document

how to pass JVM arguments in AWS ECS?

拟墨画扇 提交于 2019-12-11 17:50:31
问题 I am trying to set up a microservice in Amazon ECS. How can JVM arguments be configured and passed to the microservice? 回答1: We do this sort of thing by passing them as env variables on the task. When you edit your container in your task, scroll down to the Env Variables section: You can then reference these as normal env variables on the command line when you launch your application. 回答2: You can set an ENTRYPOINT in your Dockerfile like: ENTRYPOINT ["java","-Xms1024m","-Xmx1800m","-jar","

AWS ECS: Severe bug in ECS Service Cloudformation template

佐手、 提交于 2019-12-11 04:13:35
问题 Trying to create an ECS service using cloudformation via the following manifest that has the appropriate imports UIService: Type: AWS::ECS::Service Properties: Cluster: !ImportValue ECSClusterName DesiredCount: 1 LaunchType: EC2 LoadBalancers: - ContainerName: !ImportValue UIContainerName ContainerPort: '80' TargetGroupArn: !ImportValue UITGArn ServiceName: ui-service ServiceRegistries: - RegistryArn: arn:aws:servicediscovery:eu-west-1:944094092130:service/srv-oIclu40KCKM3esez7 TaskDefinition