amazon-ecs

Can I run aws-xray on the same ECS container?

廉价感情. 提交于 2021-01-29 17:42:13
问题 I don't want to have to deploy a whole other ECS service just to enable X-Ray. I'm hoping I can run X-Ray on the same docker container as my app, I would have thought that was the preferred way of running it. I know there might be some data loss if my container dies. But I don't much care about that, I'm trying to stop this proliferation of extra services which serve only extra analytical/logging functions, I already have a logstash container I'm not happy about, my feeling is that apps

ECS logs: Fargate vs EC2

醉酒当歌 提交于 2021-01-29 15:31:12
问题 When I usually run a task in ECS using Fargate, the STDOUT is redirected automatically to cloudwatch and this application logs can be found without any complication. To clarify, for example, in C#: Console.WriteLine("log to write to CloudWatch") That output is automatically redircted to CloudWatch logs when I use ECS with Fargate or Lambda functions I would like to do the same using EC2. The first impression using ECS with EC2 is that this is not as automatic as Fargate. Am I right? Looking

distribute files between multiple docker containers

坚强是说给别人听的谎言 提交于 2021-01-29 14:54:02
问题 We are deploying multiple containers(1000) using ECS, each container use the same code to start an application, but will consume a different config file (we have the files ready.) You can think about the scenario like this: there is 1000 files, and there is 1000 containers, each container will get its unique file and do some work. One simple approach would be create individual docker image for each container instance, with the only difference of that config file. (Definitely not a good

Does ECS task definition support volume mapping syntax?

馋奶兔 提交于 2021-01-29 13:14:32
问题 docker-compose spec support volume mapping syntax under services , for example: version: '2' volumes: jenkins_home: external: true services: jenkins: build: context: . args: DOCKER_GID: ${DOCKER_GID} DOCKER_VERSION: ${DOCKER_VERSION} DOCKER_COMPOSE: ${DOCKER_COMPOSE} volumes: - jenkins_home:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock ports: - "8080:8080" Following "AWSTemplateFormatVersion": "2010-09-09" , the corresponding ECS task definition has volume syntax un-readable

AWS ECS Blue/Green CodePipeline: Exception while trying to read the image artifact

爷,独闯天下 提交于 2021-01-28 11:50:55
问题 I wanted to create a CodePipeline which builds a container image from CodeCommit source and afterwards deploys the new image in Blue/Green fashion to my ECS service (EC2 launchtype). The source stage is CodeCommit, which already includes appspec.json as well as taskdef.json The build stage is building the new container & pushing it to ECR successfully, the file imagedefinition.json is the BuildArtifact created at this step, containing the container and the recently created image with its tag

.NET Core high memory usage in Docker (AWS ECS Fargate)

断了今生、忘了曾经 提交于 2021-01-28 03:14:02
问题 Here is a description of the application. I have a console application that runs Hangfire. There are several jobs that are recurring. One job, in particular, parses several large XML files. I deploy this console app as an AWS ECS Fargate ontainer. Every time the recurring job runs, the container memory usage keeps rising and rising until either the application becomes unresponsive or AWS kills the container. This is a 16GB container on ECS (big) and so it should be able to handle anything I

How to communicate between containers in the same task in AWS ECS?

浪尽此生 提交于 2021-01-27 21:51:06
问题 I have a service-A with a task definition task-A that includes multiple container definitions, for example nginx and grafana . How can these containers communicate with each other? The network used is the default bridge network. I have tried curl grafana:3000 , but the container is not able to resolve the name. If I would try the same on my local machine it would work. What am I missing? Here is my task definition: resource "aws_ecs_task_definition" "this" { family = "x" execution_role_arn =

How do I deploy updated Docker images to Amazon ECS tasks?

徘徊边缘 提交于 2021-01-20 14:10:52
问题 What is the right approach to make my Amazon ECS tasks update their Docker images, once said images have been updated in the corresponding registry? 回答1: If your task is running under a service you can force a new deployment. This forces the task definition to be re-evaluated and the new container image to be pulled. aws ecs update-service --cluster <cluster name> --service <service name> --force-new-deployment 回答2: Every time you start a task (either through the StartTask and RunTask API

How do I deploy updated Docker images to Amazon ECS tasks?

拜拜、爱过 提交于 2021-01-20 14:05:51
问题 What is the right approach to make my Amazon ECS tasks update their Docker images, once said images have been updated in the corresponding registry? 回答1: If your task is running under a service you can force a new deployment. This forces the task definition to be re-evaluated and the new container image to be pulled. aws ecs update-service --cluster <cluster name> --service <service name> --force-new-deployment 回答2: Every time you start a task (either through the StartTask and RunTask API

Connect Python app with redis using Ecs Ec2 [closed]

拟墨画扇 提交于 2021-01-07 03:05:47
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago . Improve this question I have 2 dockerfile and I want to link them using Aws-ECS service. I want to link them using Ecs Ec2. What steps I should keep in mind to link the container and what network mode should I used. Lets say I want to expose the container on localhost:5000. I