-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow update time out and memory size in each function #33
Conversation
@@ -119,8 +119,8 @@ private boolean shouldUpdate(LambdaFunction lambdaFunction, GetFunctionResult ge | |||
.withDescription(lambdaFunction.getDescription()) | |||
.withHandler(lambdaFunction.getHandler()) | |||
.withRole(lambdaRoleArn) | |||
.withTimeout(timeout) | |||
.withMemorySize(memorySize) | |||
.withTimeout(ofNullable(lambdaFunction.getTimeout()).orElse(timeout)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! .withTimeout(lambdaFunction.getTimeout()) is enough as it is defaulted already in AbstractLambdaMojo:221
.withTimeout(timeout) | ||
.withMemorySize(memorySize) | ||
.withTimeout(ofNullable(lambdaFunction.getTimeout()).orElse(timeout)) | ||
.withMemorySize(ofNullable(lambdaFunction.getMemorySize()).orElse(memorySize)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! .withMemorySize(lambdaFunction.getMemorySize()) is enough as it is defaulted already in AbstractLambdaMojo:222
Good catch Mạnh Tú ! I added some comments to commit. Please make changes and it will be good to merge. |
We don't need ofNullable because of it is defaulted already in AbstractLambdaMojo (line 221 and 222)
SeanRoy, |
Thanks guys, I'll take a look at it soon On Wednesday, September 14, 2016, Vũ Mạnh Tú notifications@github.com
sean@nrby.com brittany.campbell@ping4.com | nrby.com This message is intended only for the use of the individual or entity named |
Hi SeanRoy,
I found this project when I trying to write a simple python script to upload multi function in same project to AWS lambda. Now, it's not necessary anymore. Thanks you.
However, when I upload my function to AWS, I already set memory size of my function is 256MB
<lambdaFunctionsJSON> [ { "functionName": "GetToken", "description": "Get token from refresh token", "handler": "com.woodenextreme.webservice.GetTokenHandler", "timeout": 60, "memorySize": 256 }, { "functionName": "GetIAP", "description": "Get IAP of current user", "handler": "com.woodenextreme.webservice.GetIAPHandler", "timeout": 60, "memorySize": 256 } ] </lambdaFunctionsJSON>
However, when I check in AWS console, I found this value have been changed to 1024MB.
I check in your code and I think, maybe you forgot to check if user already set time out & memory or not.
Hope to heard from you soon,
Mạnh Tú