-
Notifications
You must be signed in to change notification settings - Fork 293
noDeploy defaults lost when defining overrides #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 Also, I am noticing that noDeploy doesn't appear to do anything for me (e.g. |
Could you both share your relevant sections of custom:
pythonRequirements:
noDeploy:
- boto3
- botocore
- docutils
- jmespath
- python-dateutil
- s3transfer
- six
- pip
- setuptools
- flask |
@petergaultney I have the same issue, |
OK, based on #138 (comment) I managed to remove things from custom:
pythonRequirements:
dockerizePip: true
zip: true
noDeploy:
- boto3
- botocore
scriptHooks:
before:package:createDeploymentArtifacts:
- "zip -d .requirements.zip boto3/* botocore/* || echo ERR: UNABLE TO REMOVE FROM ZIP" |
@dschep indeed I use this plugin to prepare my greengrass lambda functions and i DO need boto3, botocore, etc. embedded in my package as they are not available by default in the greengrass lambda environment |
Thanks for the reports & work around. I'll take a look at this tonight. @mrtj, interesting. I'd never heard of greengrass. |
Hi, I was just wondering whether there had been any movement on;
Thanks, |
@Laurian, I just added a test.. AFAICT zip & noDeploy work fine together. See 4447b28
|
Thanks, |
Ah, I see your point for the 2nd one now. makes sense for things like boto3. |
I don't think I believe it's because Update: |
Hello, I had a similar issue but I was trying to achieve the opposite. When I have zip: true and I have a noDeploy of [], a newer boto3 version would get rolled up in the requirements.zip, but when the Lambda ran, it was running the "default" boto3 version that comes with the Lambda. In order to fix this issue, when I comment out the zip: true line, it allowed me to utilize my local boto3 version from Pipfile (and from the requirements.zip/txt). This issue gave me the hint of commenting out the zip: true line to have success with overriding AWS's boto3 default. |
I am still having issues with this. What I have seen is that the tests cover removal of an optional package: flask and the inclusion of a core package boto3. Is there a test of noDeploy on boto3 or botocore (or other core packages)? I have tried combinations of zip & dockerizePip serverless: 1.48.4 |
closing since in v5 there are no defaults, per aws recomendations for pckaging |
Hi,
On setting some additional noDeploy overrides within my configuration I noticed my deployed package instantly began to bloat in size. It turns out that by setting an override all the core default are lost.
Defaults:
This means you begin to include things like boto3 within your deployment package unless you replicate the overrides defined above in your serverless yaml (in addition to your specific overrides).
This seems a bit wrong as you will never want to deploy the above libraries and it would seem to make more sense to include the noDeploy overrides specified within the serverless.yaml as an override to this list not as a replacement for it?
Thanks,
John
The text was updated successfully, but these errors were encountered: