Closed mark-burns closed 7 years ago
I think this is resolved by #9
My review of the latest code says otherwise. When running in the Lambda environment I had to modify the code in order to get my Lambda environment variable to convert properly. Since there is no implicit cast to String I had to convert to string and compare against common values for true.
I had the same issue. The only way I could get the DRYRUN variable to evaluation as false in the lambda, was to set the DRYRUN environment variable to an empty string ("").
In the Lambda environment I was unable to get the DRYRUN parameter to work. After some debugging I could see that strings were not being converted to boolean. I find that the following code works. I'm not a python expert so there may be a better way to do the same thing.
DRYRUN = bool(str(os.environ.get('DRYRUN', "True")).lower() in ("yes", "true", "t", "1"))