amazon-ecs

ECS agent can not successfully pull image from ECR

一个人想着一个人 提交于 2019-12-21 01:58:16
问题 I have an ECS managed EC2 instance running in a VPC (in one of the private subnets). When trying to run a task on this instance it doesn't seem to be able to pull the image. As far as I can make out from the documentation there is no special configuration needed for the ECS agent to pull the image from the repo. Looking at the Docker logs I repeatedly see the following: level=error msg="Download failed, retrying: dial tcp 54.231.17.81:443: i/o timeout" The ecs-agent logs repeatedly show me

How to run AWS ECS Task overriding environment variables

北战南征 提交于 2019-12-20 18:16:06
问题 To override environment variables via CLI we may use --overrides (structure) according to AWS ECS Commandline Reference. How to pass name value pairs (structure or JSON) in command line? [ { "name" : "NAME", "value" : "123" }, { "name" : "DATE", "value" : "1234-12-12" }, { "name" : "SCRIPT", "value" : "123456" } ] I'm looking for a way to override above environment variables using AWS ECS CLI. Something like: aws ecs run-task --overrides <<just environment vars here>> --task-definition ...

How to run AWS ECS Task overriding environment variables

不羁岁月 提交于 2019-12-20 18:16:06
问题 To override environment variables via CLI we may use --overrides (structure) according to AWS ECS Commandline Reference. How to pass name value pairs (structure or JSON) in command line? [ { "name" : "NAME", "value" : "123" }, { "name" : "DATE", "value" : "1234-12-12" }, { "name" : "SCRIPT", "value" : "123456" } ] I'm looking for a way to override above environment variables using AWS ECS CLI. Something like: aws ecs run-task --overrides <<just environment vars here>> --task-definition ...

AWS ECS Error when running task: No Container Instances were found in your cluster

爱⌒轻易说出口 提交于 2019-12-17 08:15:06
问题 Im trying to deploy a docker container image to AWS using ECS , but the EC2 instance is not being created. I have scoured the internet looking for an explanation as to why I'm receiving the following error: "A client error (InvalidParameterException) occurred when calling the RunTask operation: No Container Instances were found in your cluster." Here are my steps: 1. Pushed a docker image FROM Ubuntu to my Amazon ECS repo. 2. Registered an ECS Task Definition: aws ecs register-task-definition

service unable to place a task

半世苍凉 提交于 2019-12-14 03:53:25
问题 Ok, I am lost with where to to even troubleshoot this. I am trying to spin up a stack that has a basic app running in ECS. I will show the cloudformation below. But I keep getting: service sos-ecs-SosEcsService-1RVB1U5QXTY9S was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section. I get 2 EC2 instances up and running but neither appear in the ECS

AWS Fargate - CannotPullContainerError (500)?

拟墨画扇 提交于 2019-12-14 00:49:41
问题 I'm using AWS ECS to host my services. When I try to define task with fargate, I'm getting this below problem. CannotPullContainerError: API error (500): Get https://xxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) Further I gave full permissions to access ECR in the IAM user as well. Please help me to sort out this problem. 回答1: Have a look here: https://github.com/aws/amazon-ecs-agent

Microservice deployment using AWS ECS service

你离开我真会死。 提交于 2019-12-13 03:38:35
问题 I am trying to creating a microservice using spring boot and trying to deploy using AWS ECS cloud service. I Have doubts in deployment using ECS. In ECS there is a facility of EC2 launch type. Here my doubt is that, when I am using ECS EC2 launch type, can I choose my own Ubuntu machine instances? I need to know whether the ECS provide provision to launch with my own Ubuntu machine? 回答1: Yes, you can use your own Ubuntu AMI, but it requires a little bit of work. Here are the requirements: A

AWS ECS Service Definition: Role property

杀马特。学长 韩版系。学妹 提交于 2019-12-13 02:58:24
问题 I am setting up an AWS ECS Service using cloudformation and yaml syntax. At some point, in the relevant documentation there is a property called Role whose definitions is the following: Role The name or ARN of an AWS Identity and Access Management (IAM) role that allows your Amazon ECS container agent to make calls to your load balancer. Note In some cases, you might need to add a dependency on the service role's policy. For more information, see IAM role policy in DependsOn Attribute.

How to share file or directory with other container on ECS?

淺唱寂寞╮ 提交于 2019-12-12 19:00:42
问题 I have a Sumologic log collector which is a generic log collector. I want the log collector to see logs and a config file from a different container. How do I accomplish this? 回答1: ECS containers can mount volumes so you would define { "containerDefinitions": [ { "mountPoints": [ { "sourceVolume": "logs", "containerPath": "/tmp/clogs/" }, } ], "volumes": [ { "name": "logs", } ] } ECS also has a nice UI you can click around to set up the volumes at the task definition level, and then the

How to scale down/up containers in aws ecs cluster by command line, should I use aws cli or ecs-cli?

心不动则不痛 提交于 2019-12-12 17:40:54
问题 I'm running AWS ECS cluster with EC2 instances and I want a command to scale up the tasks to 1 running instance and then after some time when I do not need it I want to scale it down to 0. This should destroy the underlying EC2 instance to avoid charges. I'm not using Fargate as it is not in free tier. what I'm currently using to scale up to one and start running it: ecs-cli scale --capability-iam --size 1 --cluster myEC2clusterName --region us-east-1 aws ecs run-task --cluster