A developer is tasked with maintaining the consistent deployment of a serverless function across multiple environments. This function requires a specific version of an external library. What approach should the developer take to manage the dependencies of the serverless function efficiently?
Utilize layers to package the external library, managing its version independently.
Manage the library version through a configuration management service.
Incorporate the library code within the function's script.
Embed the dependencies directly into the function's deployment package.