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?
Manage the library version through a configuration management service.
Embed the dependencies directly into the function's deployment package.
Utilize layers to package the external library, managing its version independently.
Incorporate the library code within the function's script.