After you create the function, you can configure settings for many function capabilities and options similar as permissions, environment variables, tags, and layers.
To keep secrets out of your function code, store them in the function's configuration and read them from the execution terrain during initialization. Environment variables are always encrypted at rest, and can be encrypted client- side as well. Use environment variables to make your function code portable by removing connection strings, passwords, and endpoints for external resources.
Versions and aliases are secondary resources that you can produce to manage function deployment and incantation. Publish performances of your function to store its code and configuration as a separate resource that can not be changed, and create an alias that points to a specific version. also you can configure your clients to invoke a function alias, and update the alias when you want to point the client to a new version, instead of updating the client.
As you add libraries and other dependencies to your function, creating and uploading a deployment package can slow down development. Use layers to manage your function's dependencies independently and keep your deployment package small. You can also use layers to share your own libraries with other customers and use publicly available layers with your functions.