Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for AWS Lambda Python 3.6 #92

Open
egeloen opened this issue Sep 13, 2018 · 4 comments
Open

Support for AWS Lambda Python 3.6 #92

egeloen opened this issue Sep 13, 2018 · 4 comments

Comments

@egeloen
Copy link

egeloen commented Sep 13, 2018

Hey!

First, thanks for your library, it saves me some times :)

For the background, we have integrated this library in a Lambda function triggered periodically. To do it, we use: https://gist.github.com/egeloen/6fb87773a6e0b548b02a0394f4d4851a with a CloudWatch event.

Everything is working fine when using Python 2.7 but when trying to upgrade to Python 3.6, we faced an issue. Basically, on the Python 2.7 runtime, AWS have compiled Python with curses but for Python 3.6 they didn't. So, we can't upgrade as this library relies on blessings which relies on curses.

Since I'm not a Python guy, I'm not sure what is the best option here. What would you advice?

@MacPower
Copy link

MacPower commented Oct 2, 2018

Hello, I wrote also the amicleaner as a Lambda function.

I use python 3.6 with no issues. The catch here is that the blessings library is used for colored logs. In the case of a Lambda function, logs are written to Cloudwatch and so not colored.

I removed the blessings library and implentations and it works juste fine !

I also added options to filter ressources --include-mapping-values, statistics (number of gb to be removed) and also the logging of what will be deleted, i'm working on uploading my fork soon if you're interested.

All the resources are deployed via a Cloudformation stack, with parameters of the concerned mapping values, retention days, excluding mapping values, dryrun and more

@anjo-swe
Copy link

@MacPower did you ever upload your fork?

@MacPower
Copy link

MacPower commented Jan 7, 2019

@anjo-swe I did not for now, but I'll soon

@MacPower
Copy link

I have to check with my company rules before, but I did not forget !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants