- By Gojko Adzic
Claudia 2.2.0 is now on NPM, introducing support for recently introduced Lambda Environment Variables. You can provide the variables in two ways:
- For a list of key-value pairs from the command line, use
--set-env. For example,
claudia update --set-env DBNAME=proddb,QUEUE=sqs
- To version-control configuration, and simplify command lines, you can also store the values in a JSON file, and use
- To use a custom KMS encryption key, use
--env-kms-key-arnand provide the ARN of your KMS key.
These options are available for
claudia update and
claudia set-version. If you provide a new configuration to
set-version, it will publish a new version after updating the configuration, not just reassign the alias to the last known version.
Check out the Environment Variables example project for a full example, and the Managing Lambda Versions tutorial for an in-depth explanation of the new options and how they compare to using other ways of managing configuration.
The 2.2.0 version also enables functions to be created without any IAM access, which may be important for larger organisations where developers do not have direct access to IAM. Just pass an existing IAM role ARN with
claudia create. Using the role name as
--role still works (and requires read-only access to discover the ARN), but if you pass an ARN instead of a name, Claudia will not even try to access IAM during deployment.
Interested in Claudia.js? Get notified when we release a new version.
Low-volume, high value mailing list, no ads or spam.