aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
zendevil 2021-03-18T19:51:18.000400Z

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

zendevil 2021-03-18T19:51:42.000700Z

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

zendevil 2021-03-18T19:52:24.001600Z

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?

nbardiuk 2021-03-18T21:51:02.004600Z

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

zendevil 2021-03-18T22:21:11.005200Z

thanks @nbardiuk

zendevil 2021-03-18T22:23:53.007200Z

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?

zendevil 2021-03-18T22:25:31.007600Z

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.

lukasz 2021-03-18T23:15:09.007700Z

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

zendevil 2021-03-18T23:21:08.008Z

@lukaszkorecki what do you use instead of eb?

lukasz 2021-03-18T23:21:20.008200Z

ECS+Fargate

zendevil 2021-03-18T23:23:18.008400Z

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

zendevil 2021-03-18T23:23:25.008600Z

502

lukasz 2021-03-18T23:23:49.008800Z

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

zendevil 2021-03-18T23:27:05.009Z

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

zendevil 2021-03-18T23:27:34.009200Z

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

lukasz 2021-03-18T23:28:51.009400Z

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

lukasz 2021-03-18T23:29:16.009600Z

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

zendevil 2021-03-18T23:30:12.009800Z

@lukaszkorecki just curious. What was the previous setup?

lukasz 2021-03-18T23:33:16.010Z

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.

zendevil 2021-03-18T23:36:12.010200Z

do you use aws lambda with ecs + fargate?

zendevil 2021-03-18T23:37:00.010400Z

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

lukasz 2021-03-18T23:43:55.010600Z

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).

lukasz 2021-03-18T23:44:12.010800Z

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