nccgroup / opinel

Python code shared by Scout2 and AWS-Recipes
GNU General Public License v2.0
24 stars 18 forks source link

minor changes to allow opinel to function from within AWS Lambda #22

Closed micksmix closed 6 years ago

micksmix commented 6 years ago

I want to be able to run Scout2 from within AWS Lambda. However, within Lambda the home directory is not writable, which causes opinel to fail. This minor modification handles the exception, and when it occurs, uses /tmp/.aws/opinel. I'm using the tempfile module to correctly select the system temp dir.

micksmix commented 6 years ago

I'll investigate the causes of the errors reported by Travis CI

micksmix commented 6 years ago

My test is failing because the encrypted environment variables are removed from Travis CI when I personally run the tests: https://travis-ci.org/nccgroup/opinel/jobs/322603733#L441

Please review my pull request. The code changes are working for me when I run in AWS Lambda, and when I run locally on my Linux system. Making this change will allow opinel to be used within AWS Lambda...which means I can use Scout2 in AWS Lambda.

If someone with write access to this repo runs the tests (and therefore Travis CI will include the encrypted environment variables required to pass the failing test), I believe this will pass.

l01cd3v commented 6 years ago

Thanks ! I'll give this a try this weekend.

l01cd3v commented 6 years ago

Thanks !

l01cd3v commented 6 years ago

Released in 3.3.3