Skip to content

feature: add update_configuration method to Lambda helper - #5591

Closed
goel-akas wants to merge 2 commits into
aws:masterfrom
goel-akas:feature/3445-lambda-update-configuration
Closed

goel-akas wants to merge 2 commits into
aws:masterfrom
goel-akas:feature/3445-lambda-update-configuration

Conversation

@goel-akas

Copy link
Copy Markdown
Contributor

Issue #, if available: #3445

Description of changes:
Add Lambda.update_configuration() to support updating function configuration (timeout, memory, runtime, handler, role, vpc, env, layers) via update_function_configuration boto3 API. Includes retry logic for ResourceConflictException consistent with existing update().

Also fixes typo in update(): 'funtion:' -> 'function:' in ARN parsing.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add Lambda.update_configuration() to support updating function
configuration (timeout, memory, runtime, handler, role, vpc, env,
layers) via update_function_configuration boto3 API. Includes retry
logic for ResourceConflictException consistent with existing update().

Also fixes typo in update(): 'funtion:' -> 'function:' in ARN parsing.
@mohamedzeidan2021

Copy link
Copy Markdown
Collaborator

Thanks for this, and sorry for the long silence. Still wanted — update_configuration()
is missing from lambda_helper.py and #3445 is still open. The funtion: → function:
fix is real too: the typo means split(":")[0] runs on the whole ARN, so the S3 prefix
ends up as the literal "arn".

Tests pass (33/33); the only conflict is docs/index.rst over a trailing newline.

Three things before merge:

1. It resets fields the caller didn't touch. timeout, memory_size, and runtime
default to 120, 128, "python3.8" in __init__, so the is not None guards always
fire — changing only memory_size also sends Runtime='python3.8' and Timeout=120,
downgrading a live function to an EOL runtime. Needs explicit kwargs on
update_configuration(...) or sentinel defaults.

2. Codestyle blocks. flake8 E303 before def upsert; black src/sagemaker/core/lambda_helper.py fixes it.

3. Split out the typo fix into its own PR so it can merge now, separate from (1).

@mohamedzeidan2021

Copy link
Copy Markdown
Collaborator

Closing for now. Stale PR. Please re-open if you would like to start conversation again on getting this merged.

This branch had an error being deployed

1 failed deployment
manual-approval — 4352b16a Deployed Oct 1, 2026 by mohamedzeidan2021 via wait-for-approval #515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants