Fork me on GitHub
#aws
<
2021-03-18
>
zendevil19:03:18

I using amazonica to put an object in a bucket like so:

zendevil19:03:42

(s3/put-object
           :endpoint ""
           :bucket-name "humboi-videos"
           :key thumbnail-name
           :file "./resources/public/thumbnail.png"
           :access-control-list {:grant-permission ["AllUsers" "Read"]})

zendevil19:03:24

What I want to know is how much progress has been made in putting the object in the bucket. For example if the total data is 1000 bytes, I want to know how many bytes has been uploaded to the s3 bucket. How can I achieve this?

nbardiuk21:03:02

there is no solution out of the box. But with some effort you can write it yourself. The trick is to upload :input-stream instead of :file where the input stream would be a proxy that notify about how much data was consumed

zendevil22:03:53

I’m uploading a jar on Elastic Beanstalk. The lein project was created using #luminus. The jar is created with lein uberjar and when run on the local machine works fine, i.e., requests to localhost:3000 work fine. But when I upload the jar on Elastic Beanstalk on the java platform, I’m getting a 502 Bad Gateway on the app link. How do I fix this?

lukasz23:03:09

Never used EB, but according to these docs - you need to listen to port 5000 https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-nginx.html

zendevil23:03:08

@U0JEFEZH6 what do you use instead of eb?

lukasz23:03:20

ECS+Fargate

zendevil23:03:18

@U0JEFEZH6 changing to 5000 didn’t work. Getting the same error

lukasz23:03:49

Digging through docs should help, as I mentioned - never used it, but the setup is pretty clearly explained.

zendevil23:03:05

@U0JEFEZH6 is there a reason you chose ecs + fargate rather than elastic beanstalk?

zendevil23:03:34

it seems like eb manages scaling automatically and doesn’t charge extra for it

lukasz23:03:51

We have dozen or so Clojure services and we've been using Docker for last 4 year or so. Autoscaling is not a requirement, and ECS can guarantee that the system stays up in rare case of something shutting down

lukasz23:03:16

Was easier to transition to ECS from our previous setup, than learn EB

zendevil23:03:12

@U0JEFEZH6 just curious. What was the previous setup?

lukasz23:03:16

Terraform + Ansible + Google Cloud platform VMs. Became too manual to maintain, even though it was simple to operate. ECS+Fragate is working great for us, never had issues with it and we're Ansible-free. Everything is stored as code and cleanly setup.

zendevil23:03:12

do you use aws lambda with ecs + fargate?

zendevil23:03:00

and what does one need to learn in terms of devops to use ecs + fargate?

lukasz23:03:55

AWS docs have a lot of resources explaining how to get started, including the copilot tool that they released not long ago. Not sure if it's learnable, like a programming language- there's way more moving parts (IAM, AWS networking, Docker itself and more).

lukasz23:03:12

Lambda has nothing to do with ECS/Fargate directly, as far as application deployments are concerned. Different tool

zendevil00:03:17

@U0JEFEZH6 have you ever used k8s with eks?

zendevil00:03:51

instead of fargate? I’ve heard that the provisioning with fargate isn’t reliable because cpu power can vary by a factor of 5

zendevil02:03:20

Here are the logs of the deployment

phoenixjj03:03:02

Unable to connect to localhost:8182 ?

phoenixjj03:03:31

what is running on 8182 ? and on which server ?

zendevil03:03:41

I think the problem is that the datomic access gateway needs to be run before the client can connect

zendevil03:03:11

And I don’t know of a simple way to do that other than creating a docket image with those commands

zendevil03:03:27

There must be a simpler way?

zendevil22:03:31

I’m getting a severe status with the following points: • 100.0 % of the requests are failing with HTTP 5xx. • ELB processes are not healthy on all instances. • ELB health is failing or not available for all instances.