5 ms·
I don't understand this comment. You can run arbitrary code in AWS lambda, you can just run "tar". Why did you need to reimplement it?
by gnulinux 6y ago
I don't understand this comment. You can run arbitrary code in AWS lambda, you can just run "tar". Why did you need to reimplement it?
- 411111111111111 6y agoIt wasn't always like that though. I think they added custom runtimes around 2yrs ago... Your options were very limited before that.
- thenickdude 6y agoBefore custom runtimes it was still possible to ship your own binaries and shell out to them from the official handler function.
- rescbr 6y agoI suppose they are streaming the tarball directly to S3 using multipart uploads, maybe parallelizing this task at the same time. You wouldn't be able to do it using regular tar.
- nomy99 6y agohit the nail on the head
- thenickdude 6y agoYes, you can, you can pipe tar to the AWS CLI to upload a stream, like "tar -c ./myfiles | aws s3 cp - s3://my-bucket/myobject". For very large uploads you must also specify a chunksize using "multipart_chunksize" such that the upload will require 10,000 chunks or fewer (the CLI can't do this for you because it doesn't know the size of your stream up front).
- nomy99 6y agoWouldn’t you have to have an ec2 open ? We are trying to minimize infrastructure and do it all in lambdas
- thenickdude 6y agoNothing prevents calling the AWS CLI inside a Lambda.