Questions tagged [amazon-ecs]

1

votes
1

answer
457

Views

AWS ECS Fargate pull image from a cross account ECR repo

I have 2 AWS accounts: - account A that has an ECR repo. - account b that has an ECS cluster running Fargate. I have created a 'cross-account' role in account A with trust relations to account B, also I have attached the 'AmazonEC2ContainerRegistryPowerUser' policy to this role. I gave access to th...
Anthony Khodr
1

votes
2

answer
1.7k

Views

Change Instance type of a cluster registered ec2 instance

I have an Amazon EC2 instance which is registered to a cluster of Amazon ECS. And I want to change this instance's type from c4.large to c4.8xlarge. I'm able to change its type from c4.large to c4.8xlarge in AWS console. But after the change, I found [ERROR] Could not register module='api client'...
Brian
1

votes
0

answer
87

Views

docker orchestration - connect to remote interpreter using pycharm

i'm trying to connect pycharm to docker remote interpreter, but the container is part of a cluster (specifically using AWS ECS cluster) i can not access the container directly i have to go through the bastion machine (the instance that is running the container do not have public IP) i.e to access th...
gCoh
1

votes
0

answer
138

Views

No network connection on Multiple docker container in Elastic Beanstalk

I'm trying to deploy a multiple docker container to Elastic Beanstalk. There is two containers, one for the supervisor+uwsgi+django application and one for the JavaScript frontend. Using docker-compose it works fine locally My docker-compose file: version: '2' services: frontend: image: node:latest...
danielfranca
1

votes
1

answer
43

Views

docker overlay for local development and remote containers

I am looking to improve our development cycle, using multiple docker containers, used by multiple dev teams Currently each dev team is responsible of few services, that are dependant on other teams services. Meaning all dev teams need to run all containers locally What i'm trying to figure out is h...
gCoh
1

votes
1

answer
100

Views

How to run a Docker image from the ECS repo?

I have managed to push a Docker image to the ECS repo (I also pushed it to docker hubs repo). I have created a cluster and an EC2 instance with public IP. What now? How do you run the server? Do you have to push it from the repo somewhere? Will it just run automatically now? Do I have to setup a scr...
grabury
1

votes
1

answer
328

Views

How can I deploy an ML model from ECS to Sagemaker?

I have a model which was trained locally, then transfered to AWS ECS. I would like to deploy it to Sagemaker. Currently, I do: from sagemaker.estimator import Estimator model = Estimator(image, role, 1, 'ml.c4.2xlarge', output_path='s3://{}/output'.format(sess.default_bucket()), sagemaker_session=se...
Martin Thoma
1

votes
0

answer
146

Views

Neo4j Casual Cluster on AWS ECS

I am trying to stand up a Neo4j Casual Cluster on AWS. I chose ECS over fargate and elastic beanstalk because I want to enjoy the cost savings of not using an elastic load balancer. Those things are expensive. Is casual clustering (taking advantage of the built in neo4j routing) the best way to go?...
Alex Brufsky
1

votes
0

answer
167

Views

ECS instance scaling to/from 0

I have a service which runs 1 task. The task takes 2 hours to run and runs daily. My ideal scenario would be this: I update my service to from 0 desired tasks to 1 desired task ECS sees that in order to run the service I need an EC2 Instance. It therefore spins up an instance to run the task. Whe...
rix
1

votes
1

answer
318

Views

Find aws ecs latest task and image used

I trying to find out the latest task and image used for ECS container service. I tried using AWS ECS cli, able to list services/tasks running but not able to find out running latest task ID and image used for that task. Can someone help with AWS CLI or Boto script to find out latest task and image u...
beginnertopython
1

votes
2

answer
663

Views

Getting Access Denied for pulling object from S3 bucket from ECS using IAM Role

I am trying to get some encrypted connection parameter from s3 bucket in my sample Spring application. Here is the method I am using to run inside a container: public void encryptionOnly_KmsManagedKey() throws NoSuchAlgorithmException { AmazonS3Encryption s3Encryption = AmazonS3EncryptionClientBuild...
amiivas
1

votes
0

answer
300

Views

How to push docker image to Amazon ECR using io.fabric8 maven plugin with authorization

I have a plugin to create a image, once created it need to be pushed to amazon ECR Please look into my plugin in the below` io.fabric8 docker-maven-plugin 0.24.0 https://accountID.dkr.ecr.us-east-1.amazonaws.com authorization Token Access Key ID Secret Key Id service ${project.artifactId} openjdk:8-...
Damodar
1

votes
0

answer
323

Views

Error while deploying from Gitlab to ECS using ecs-cli

I am getting the below error while I am trying to stand-up containers in ECS from a pipeline in Gitlab. When I attempt to do it from my my local machine, it succeeds with no issues. The following is the error from the job on the runner. level=error msg='Failed to Create Cluster' error='NoCredentialP...
Joe
1

votes
2

answer
35

Views

Launch Configurations Created using AWS-Console VS Programatically

I would like to find out if there is an easy way to find out whether given launch configuration is created using AWS Console or Programatically? Usecase: We are planning to avoid copying/creating launch configuration using AWS-Console, so we would like to implement some alert system if there is any...
cnutext
1

votes
0

answer
45

Views

How to share folders from a container to another container using --link

I'm trying to dockerize a rails app and nginx with 2 separate containers. The rails app uses Unicorn and listens on a socket with static files serving from a folder. Now I need so somehow share the .sock and a folder to the NGINX container. This is how I ran 2 containers: docker run -d --name app ap...
Casper
1

votes
1

answer
76

Views

Securing AWS ECS Cluster

We are trying to create an ECS Cluster however we noticed that the internal ECS Agent is unable to register. We unblocked TCP 443 (ACL and SG) however it still did not register. We then proceeded to open up everything All Traffic both TCP and UDP and then the agent was able to register. We tried to...
Sarah Cassar
1

votes
1

answer
641

Views

Communication between different services in AWS ECS

I am running two docker containers(One for Tomcat and other one for MySql) on AWS ECS services but both containers are generated from different task definition of different services. Currently i have configured using hostname and IP address. But i want discover them without hardcoding IP address jus...
sdindiver
1

votes
0

answer
145

Views

Bind EIP to an ECS cluster

I want all outbound traffic coming from my ECS cluster to using a single EIP. I know I could setup a nat gateway. BUT is there an ECS feature that makes this easier or more built in? Or could I use like a VPC endpoint on the ECS cluster or something? Or is the solution still just setup a nat gateway...
red888
1

votes
0

answer
70

Views

How can i use AWS ECS to run tests which in turn create containers for testing

I got this tutorial which explains how to use ECS to run jenkins master and slave on ECS https://tech.ticketfly.com/our-journey-to-continuous-delivery-chapter-4-run-jenkins-infrastructure-on-aws-container-service-ef37e0304b95 Its working fine but my issue is , My tests require first use docker comp...
Mirage
1

votes
0

answer
97

Views

Run task on new ECS instance

I'd like to run a new task on an ECS cluster when a new SNS message is published. For doing that, I have a Lambda function that runs the task. However, I don't want to have an instance always running, I'd like to have an empty cluster and run a new instance each time the lambda function is called (s...
FVod
1

votes
1

answer
1.6k

Views

ERROR: Issue with creating launcher for agent <AGENT>. The agent has not been fully initialized yet

We are running a Jenkins master/slave setup, where most jobs run stable. Unfortunately there is a job that is returning an error; ERROR: Issue with creating launcher for agent . The agent has not been fully initialized yet. This is because the slave is not occupied and being terminates by the master...
jarnohenneman
1

votes
1

answer
682

Views

Best way to implement AWS ECS healthcheck

I'm implementing ECS health-check functionality and and I'm thinking about the best way to do that. For now I have found several solutions: Using AWS ECS metrics and Dimensions and check whether some metric has insufficient value Using CloudWatch Alarm: ECSHealthAlarm: Type: AWS::CloudWatch::Alarm...
Serhii Dykyi
6

votes
2

answer
537

Views

Deploying Cassandra on ECS?

I'm trying to deploy Cassandra on AWS ECS as docker containers. Single nodes are easily done, but now I'm trying to make a cluster for it. Cassandra needs fixed ip addresses, at least for the seed nodes, which needs to be passed to all nodes in a cluster. Cassandra cannot work with ELB addresses,...
Denno
1

votes
1

answer
52

Views

How to move all existing containers on another instance before auto scale in?

I am using AWS ECS in combination with EC2 instances. Right now I am setting up Auto Scaling. How can I make sure that when, an EC2 instance gets terminated, all ECS tasks get migrated before the machine gets terminated?
Mihail Gogol
1

votes
0

answer
62

Views

AWS Which ECR image is running in my ECS task?

Is there any way to figure out which ECR imageDigest sha256-hash a particular ECS task definition is running? I want to understand wether my CI jobs works or not. A task definition has 'containerInstanceArn': 'arn:aws:ecs:::container-instance/18f9eda5-27d7-4c19-b133-45adc516e8fb', and 'containerArn...
claj
1

votes
0

answer
147

Views

Windows Docker Containers on AWS ECS - IAM Roles

According to the docs, I need to run the following PShell script when running a container so as to get access to AWS IAM Roles: $gateway = (Get-WMIObject -Class Win32_IP4RouteTable | Where { $_.Destination -eq '0.0.0.0' -and $_.Mask -eq '0.0.0.0' } | Sort-Object Metric1 | Select NextHop).NextHop $if...
Ian
1

votes
2

answer
1.3k

Views

How can i setup aws cloudwatch logs with docker ecs container

I am using Amazon ECS and docker image is using php application. Everything is running fine. In the entry point i am using supervisord in foreground and those logs are currently send to cloudwatch logs. In my docker image i have logs send to files /var/log/apache2/error.log /var/log/apache2/access....
Mirage
1

votes
2

answer
671

Views

(0,0) Object reference not set to an instance of an object Unity 2018.1.2.f1

Compile Error ECS project not compiling. Getting the error as The associated script can not be loaded. Please fix any compile errors and assign a valid script. How can i fix this problem?
1

votes
0

answer
64

Views

Can a process running in an ECS container determine its service name at runtime?

We're contemplating an infrastructure where a process running inside an ECS container passes a unique identifier to a REST API in order to retrieve its startup configuration. If we use an environment variable for the UID, it means creating a new task definition each time the service is launched, sim...
Alan
1

votes
0

answer
153

Views

AWS ecs scheduled task with cloudwatch

I am trying to create scheduled task with cloudwatch. I am using this page https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html The problem i see is when i run task normally then aws asks vpc subnets Launchtype BUT when i use cloudwatch target then it...
Mirage
1

votes
1

answer
133

Views

Dynamically set Environment Variable for Selenium Chrome Hub in ECS Docker

I have a cluster in AWS-ECS where I have custom image in ECR pulled which uses selenium/node-chrome from docker hub as a base image. This is the service I want to use as selenium node. I am passing 3 environment variable in it where one of the variable is REMOTE_HOST. I want to set it dynamically wh...
1

votes
0

answer
51

Views

How do I make my container port accesible outside container? ECS - AWS

I am trying to get a Docker container running in ECS as a task. I have created a basic express app that is listening on port 3000. Here is my AWS setup. I have a ECS cluster with one task. I have a container in my AWS repository, which is running as a task in this cluster. { 'executionRoleArn':...
jhamm
1

votes
1

answer
361

Views

AWS ECS starting a container is very slow after 1 day

I'm using ECS scheduled task to run my cron jobs. I have around 6 jobs running at various times. 3 of my jobs run every 2 minutes. Everything works fine for the first day when I launch a new instance in the ECS cluster. Then after a day, I see lots of tasks are in a pending state. I ssh into my ECS...
shakyaabiral
1

votes
1

answer
432

Views

Amazon Cognito throwing 500 internal server error on authentication

So I have an application that I am deploying through a docker container in ECS service. And I am using Amazon Cognito through application load balancer for authenticating into the application. When I configured this with internet-facing Application Load Balancer(ALB), everything worked fine. But no...
yogsma
1

votes
0

answer
17

Views

how ECS awslogs works

I'm curious how it works using awslogs driver. At Enabling the awslogs Log Driver for Your Containers section, it only mentioned setup logConfiguration using logDriver: awslogs. It indeed works out of box, but when you check the Docker Daemon on the box Docker is not using awslogs driver. So, how it...
Fei
1

votes
0

answer
15

Views

How to monitor ECS task launch loop?

I created a lambda which streams ECS events to CloudWatch ECS CloudWatch Events. I'm stuck now on how to detect infinite loops of launching tasks. I would need some kind of metrics in CloudWatch per ECS Service and create an alarm from it. But I have no clue on how to do it...
Kaymaz
1

votes
0

answer
116

Views

Service Container is not updating with environment variables

I am trying to update environment variables in an existing container through image definition file. image definition.json { 'taskDefinition': { 'family': 'testrepository', 'containerDefinitions': [ { 'name': 'testrepository', 'image': '046940809212.dkr.ecr.us-east2.amazonaws.com/testrepository', 'en...
Sarika Bindu
1

votes
2

answer
432

Views

AWS Deploy ECS with Updated Image

It appears that one must provide a new full task definition for each service update. Even though most of the time new deployments exclusively consists of updates to one of the underlying docker images While this is understandable as a core architectural choice. It is quite cumbersome. Is there a com...
echen
1

votes
0

answer
122

Views

spring-cloud-netflix zero downtime deployments on AWS ECS

We're running spring-cloud microservices using eureka on AWS ECS. We're also doing continuous deployment, and we've run into an issue where rolling production deployments cause a short window of service unavailability. I'm focusing here on @LoadBalanced RestTemplate clients using ribbon. I think I'v...
gadams00
1

votes
0

answer
131

Views

How do I get jwilder/nginx-proxy to work on Amazon ECS? I am getting a 503 error

Here's my setup: Docker Compose File for my wordpress site version: '3' services: wordpress: # image: wordpress image: 506641774060.dkr.ecr.us-west-2.amazonaws.com/cashinyourpoints:latest restart: always ports: - 8081:80 links: - mysql environment: WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD:...
Toli

View additional questions