Skip to content

Add the LambdaComponents approach as a more convenient way to build Lambda functions

Compare
Choose a tag to compare
@harris-chris harris-chris released this 03 Aug 08:15
· 52 commits to main since this release

Breaking changes:
create_local_image, push_to_ecr! and create_lambda_function now take only one non-keyword argument, to make them easier to pipe together. All other arguments have been made kwargs.

Features added
The LambdaComponents object exists in v0.2.2, but was just a way to group together related local images, remote images and lambda functions. In this version it has been made into a more convenient way to create lambda functions - for example:

lambda_components = create_lambda_components(increment_responder; image_suffix="increment-vector")
lambda_components |> with_remote_image! |> with_lambda_function! |> run_test

will go through the entire process of creating a lambda function, including testing it.

Specific changes
- Add create_lambda_components, with_local_image!, with_remote_image!
- Add delete!(::RemoteImage)
- push_to_ecr! returns RemoteImage only
- Automatically delete aws roles that were generated when a lambda function was
created, when that function is deleted
- Automatically delete ecr_repo that were created when a local image was
pushed to ECR, when the last remote image is deleted from them
- Expose get_all_xyz functions for local images, remote images,
ecr_repos, aws_roles and lambda_functions
- Enhance get_local_image(::String) to accept either name or hash
- Enhance get_remote_image(::String) to accept either name or hash
- Add the above to unit tests
- Add the above to documentation