4 ms·
We had an instance when some consultant dev wrote a lambda function which gets triggered when a new image is saved in S3, takes it resizes it and re-save it in
by praveenpenumaka 7y ago
We had an instance when some consultant dev wrote a lambda function which gets triggered when a new image is saved in S3, takes it resizes it and re-save it in same S3.
For non-technical guys, that is recursion. We were surprised to see $5000 bill in 10 days.
- williamdclt 7y agoYou got lucky, if it saved two different sizes for the each image...
- bspammer 7y agoI'm actually interested how AWS handles exponential cases like this. They must throttle it somehow, otherwise something dumb like this would be causing availability issues everyday.
- praveenpenumaka 7y agoUnfortunately, there is nothing inbuilt in AWS to mitigate these conditions, except for monitoring for "anamolous" behaviour.
- bspammer 7y agoI mean there must be something, because otherwise taking down AWS would be as simple as the above. After 50 steps, you've created a quadrillion images.
- praveenpenumaka 7y agoThey surely have very high upper limits on S3 files. Lambda functions have limit on concurrent functions you can run.