aws-fargate

Can't access S3 bucket from within Fargate container (Bad Request and unable to locate credentials)

…衆ロ難τιáo~ 提交于 2019-12-03 03:50:01
I created a private s3 bucket and a fargate cluster with a simple task that attempts to read from that bucket using python 3 and boto3 . I've tried this on 2 different docker images and on one I get a ClientError from boto saying HeadObject Bad request (400) and the other I get NoCredentialsError: Unable to locate credentials . The only real different in the images is that the one saying bad request is being run normally and the other is being run manually by me via ssh to the task container. So I'm not sure why one image is saying "bad request" and the other "unable to locate credentials". I

How can I get Public IP of my FARGATE ECS task with metadata endpoint or java sdk?

喜欢而已 提交于 2019-12-01 06:04:22
I want to get public IP of my fargate ECS task after container started. I get IPv4Addresses when requested http://169.254.170.2/v2/metadata/ but I don't get public IP of task. When I use runTask(request) method of RunTaskResult, again I don't get public IP from RunTaskResult. Is there a way to get public IP of my fargate task something like http://169.254.169.254/latest/meta-data/public-hostname (for EC2)? I solved my problem with DescribeNetworkInterfacesRequest.I get private IP of my container with curl http://169.254.170.2/v2/metadata/ then run this code. AmazonEC2 ec2AsyncClient=

How can I get Public IP of my FARGATE ECS task with metadata endpoint or java sdk?

风格不统一 提交于 2019-12-01 03:19:11
问题 I want to get public IP of my fargate ECS task after container started. I get IPv4Addresses when requested http://169.254.170.2/v2/metadata/ but I don't get public IP of task. When I use runTask(request) method of RunTaskResult, again I don't get public IP from RunTaskResult. Is there a way to get public IP of my fargate task something like http://169.254.169.254/latest/meta-data/public-hostname (for EC2)? 回答1: I solved my problem with DescribeNetworkInterfacesRequest.I get private IP of my

Linking Container in AWS Fargate

老子叫甜甜 提交于 2019-11-29 01:52:28
问题 I try to setup a little example on AWS Fargate and try to have one application container with one database container there. The task definition starts both containers, but my app container fails with getaddrinfo ENOTFOUND db db:3306 . Therefore, the database container could not be found by my app container. Since Fargate does not allow "links" of Docker containers, i'd like to know how they can communicate with each other. The database container has the name db with port 3306 and my app