Hey guys! lambda is amazing! Docker containers! They said the whole amazing point with containers is that they run the same everywhere! Except not really, because lambda 'containers' are an abomination of *nix standards with arbitrary rules that really don't make sense! That's ok though, you can push your shit to fargate, then it will work more like those docker containers you know and love and can run locally! Oh wait! fargate is a pain in the ass x 2 just to setup! You want to expose your REST api running on a container to the world? well ha, you'd better be ready to spend literally 2 weeks to configure every fucking piece of technology that every existed just to do that!!!! it's great, AWS, i love it, i'm so fucking big brained smart!!!

give me a break.... back in my day you'd set up an nginx instance, put your REST / websocket / graphQL service whatever behind it, and call it a day!!!!!!!

even with tools like pulumi or terraform this is a pain in the ass and a half, i mean what are we really doing here folks

way too complicated, the whole AWS infrastructure is setup for companies who need such a level of granularity because they have 1 billion users daily... too bad there are like 5 companies on the planet who need this level of complexity!!!!!!!

oh, and if your ego is bashed because of this post, maybe reread it and realize you're the 🤡

i'm unhappy because i was lied to. docker containers are docker containers, until they aren't. *nix standards are *nix standards, until they aren't

bed time.

  • 3
    if anyone wants to enjoy hopping in the weeds with me, i'm trying to do screen recordings with ffmpeg and xvfb. the local version of the container works fine, but as soon as it is running on lambda, the recording is just a black screen. the application i run just doesn't trigger window creation in xvfb. definitely some lambda special fuckery, but i'm not linus torvalds so i don't know what arbitrary rules AWS has applied to their runtime causing it to break 🤷‍♂️
  • 0
    There is Elastic Beanstalk for people wishing less.

    Or better just to go for granularity that is easier to manage into Kubernetes
  • 3
    This one is completely on you. Why were you trying to use lambda and fargate in the first place? Because some goofballs hyped it up even though their use case is lightyears beyond what you were trying to do? Just take a simple t3 instance and run your containers there, it's not like lambda or fargate will save you more than $5 per month...

    Lambda is great if you need to handle simple infrequent requests, like a form submission on a static website, and all you need to set up is upload a single file with your code. Fargate is great if you need to run tasks like converting videos, you make an image with all the tools and then just start it whenever a new video gets uploaded to s3, and you don't need to run an expensive instance all the time. You just pay for the time you actually need that hardware which saves you hundreds per month given the price of GPU instances, and you don't get bottlenecks if multiple videos are uploaded at the same time. You just need to know your use case.
  • 1
    my gosh just use nginx
  • 2
    "... push your shit to fartgate..." :)

    where else would you push it...
  • 1
    @netikras to the poopdeck
  • 1
    You’re probably hitting various security components in AWS versus having direct GPU access locally. For all things video related, I usually recommend straight EC2 instances. Don’t worry about Nginx, setup an ALB to your target .
  • 0
    @hitko the problem is lambda fits my use case perfectly. if i'm doing screen recordings on a single machine, multiple requests to the machine will blow out the memory eventually (not to mention ensuring that each request, even when not blowing out the memory, is concurrently safe). ideally, i want one runtime per request, which is exactly what lambda does
  • 0
    @fullstackclown Not sure if I understand what you're trying to achieve. Are you trying to send screen recordings from various sources to your API? Then a much better solution would be to directly ingest streams to S3 (e.g. through Elemental or Kinesis Video Streams). If you need some additional processing not available through Kinesis or Elemental (or AWS video processing), S3 can trigger your fargate task whenever a stream finishes uploading. It's a pretty straignt-forward solution, and it's probably cheaper too as your video processing task doesn't have to wait for the stream to finish.
  • 0
    @hitko i'm building what generates those video files ;)

    and yes, i upload them directly to s3 from the lambda
  • 0
    @fullstackclown You have an API which creates a screen recording inside a container based on the request it receives? Care to tell more?
  • 0
    @hitko muahahahah... all shall be revealed. I know it sounds rediculous but the best products usually do at the beginning

    anyway, i'm still fighting backend infrastructure, hoping to have the alpha out by next week, but who knows with this garbage
  • 0
    Setting up custom policies makes me sad. I can probably work with most other stuff, but policies drive me nuts. Also I’m using cdktf with golang and when it works I love it, but I can’t understand why sometimes empty interface properties refuse to work.
Add Comment