A Python Lambda ZIP includes urllib3 but relies on runtime-provided Boto3 and botocore. After a runtime SDK update, imports fail because of incompatible dependency versions. How should the developer make the package independent of runtime SDK version changes?
Show the answer
Correct answerA. Package compatible Boto3, botocore, and urllib3 versions together.
AWhy this is right: A complete, compatible packaged SDK dependency set takes precedence over runtime-provided SDK libraries.
BWhy not this: An environment variable does not install or pin Python SDK packages.
CWhy not this: Using the runtime's complete SDK avoids the partial override but does not provide independence from its version changes.
DWhy not this: The ZIP copy takes precedence over the layer, and the runtime SDK dependency remains.
Packaging a compatible SDK dependency set gives the function control over those versions and avoids mixing packaged libraries with an updated runtime SDK. Removing urllib3 may restore compatibility, but still leaves the function dependent on runtime SDK updates.