happy-kitchen-8948208/22/2019, 5:04 PM
, and also your BUILD file
brave-policeman-4980408/22/2019, 5:11 PM
happy-kitchen-8948208/22/2019, 5:12 PM
brave-policeman-4980408/22/2019, 5:12 PM
happy-kitchen-8948208/22/2019, 7:30 PM
is the result of applying lambdex to
, does that mean your code is in the root of the repo? I can imagine that not working
pants binary :hello-lambda
in the pants repo, I get a valid lambda
./pants binary contrib/awslambda/python/src/python/pants/contrib/awslambda/python/examples:hello-lambda
, and if that doesn't work, also try moving the code under some subdir, like
brave-policeman-4980408/23/2019, 5:24 AM
but works if I use
and it works but still when I upload it as zip to lambda service, it throws the same error which I mentioned before
happy-kitchen-8948208/23/2019, 3:43 PM
. There is an unfortunate historical distinction between
pants bundle <target>
that we may want to get rid of.
brave-policeman-4980408/23/2019, 4:08 PM
, eventhough the pex is just 100 mb. any reason for this?
unzipped files should not exceed 269 mb
happy-kitchen-8948208/25/2019, 7:39 PM
, and then upload the resulting lambda pex to s3 the way you would any other lambda.
According to this: https://docs.aws.amazon.com/lambda/latest/dg/limits.html you are limited to a 50MB zipped/250MB unzipped pex size. An 100MB pex is pretty huge, are you using many large 3rdparty dependencies? Are you pulling in deps you may not actually need? The pex overhead is ~500K compressed, so that shouldn't be an issue. Your next step should probably be to figure out why your resulting bundle is so huge.
./pants bundle path/to/python_awslambda_target