alexcasalboni / aws-lambda-power-tuning

AWS Lambda Power Tuning is an open-source tool that can help you visualize and fine-tune the memory/power configuration of Lambda functions. It runs in your own AWS account - powered by AWS Step Functions - and it supports three optimization strategies: cost, speed, and balanced.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support expansion of AWS Lambda states (all functions)

alexcasalboni opened this issue · comments

See https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

ETA: September 6 (general update) and October 1 (delayed update)

Since all the memory updates are performed via API (on $LATEST), we need to make sure the current implementation is compatible with the new states.

This API call can be used to fetch the function state:

aws lambda get-function --function-name MY_FUNCTION_NAME --query 'Configuration.[State, LastUpdateStatus]'
[
    "Active",
    "Successful"
]

Additional work might be needed to support opt-in and opt-out functions.

I confirm this error shows up with opt-in functions:

{"errorType": "ResourceConflictException", "errorMessage": "The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:XXX:function:YYY", "trace": ["ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:XXX:function:YYY", "    at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:52:27)", "    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)", "    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)", "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)", "    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:688:14)", "    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)", "    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)", "    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10", "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)", "    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:690:12)"]}

Implemented in #135. Will publish a new version on SAR soon.