awslabs / ecr-cleanup-lambda

A script to discover stale ECR images and take action on them with Lambda to help reduce costs.
Other
161 stars 96 forks source link

Pull args from env vars and override from CLI #8

Closed dyroffk closed 7 years ago

dyroffk commented 7 years ago

Small change to optionally pull the arguments from environment variables.

This should resolve https://github.com/awslabs/ecr-cleanup-lambda/issues/3 and allow the handler to successfully be run in an AWS Lambda task with control over the argument values. 2017-01-31-091503_1546x398_scrot

Behavior should not change with none of the environment variables set, and the defaults match those set by argparse