I using amazonica to put an object in a bucket like so:
(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"]})
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?
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
like in this question https://stackoverflow.com/questions/1339437/inputstream-or-reader-wrapper-for-progress-reporting
thanks @nbardiuk
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?
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.
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
@lukaszkorecki what do you use instead of eb?
ECS+Fargate
@lukaszkorecki changing to 5000 didn’t work. Getting the same error
502
Digging through docs should help, as I mentioned - never used it, but the setup is pretty clearly explained.
@lukaszkorecki is there a reason you chose ecs + fargate rather than elastic beanstalk?
it seems like eb manages scaling automatically and doesn’t charge extra for it
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
Was easier to transition to ECS from our previous setup, than learn EB
@lukaszkorecki just curious. What was the previous setup?
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.
do you use aws lambda with ecs + fargate?
and what does one need to learn in terms of devops to use ecs + fargate?
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).
Lambda has nothing to do with ECS/Fargate directly, as far as application deployments are concerned. Different tool