-
Notifications
You must be signed in to change notification settings - Fork 9
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
Python3+ not supported - Any plans to update? #22
Comments
Hi, |
We were also able to find in core.py - lines 17 and 18 appear they need to be updated from:
to:
This got us further. However, we are now running into 401 auth issues (messages leading up to errors and a couple after for reference):
I can confirm, it appears the lambda excution role and iam policies are all correct. This is not processing the EBS / Snapshots as intended in this state. Also, I think some of the requirements and potentially boto usage will have to be updated to Python3 capable utilities and boto3. Last: the iam policy in the CloudFormation template... I also changed the resources permissions from:
to:
**** change on the snapshot line. Not sure if it should be I hope this information helps for Python3. Thank you for looking into this... it's a great utility when running (one of the best utilities imo). |
See the issue isn’t strictly in the lambda_graffiti_monkey project, it’s the fact that the original graffiti_monkey tool here (https://github.com/Answers4AWS/graffiti-monkey <https://github.com/Answers4AWS/graffiti-monkey>) hasn’t been updated in a long time and still officially only uses boto2. I did see a boto3 patch for it but it was never merged.
Ideally someone would take over the development of the tool and update it to boto3/python3/etc.
… On 15 Oct 2022, at 15:55, cs-dww ***@***.***> wrote:
We were also able to find in core.py - lines 17 and 18 appear they need to be updated from:
from cache import Memorize
from exceptions import *
to:
from graffiti_monkey.cache import Memorize
from graffiti_monkey.exceptions import *
This got us further. However, we are now running into 401 auth issues (messages leading up to errors and a couple after for reference):
2022-10-14 21:56:37,042 - graffiti_monkey.core - INFO - Connecting to region us-east-1 using profile None
2022-10-14 21:56:37,043 - graffiti_monkey.core - INFO - Getting list of all volumes
2022-10-14 21:56:37,277 - boto - ERROR - 401 Unauthorized
2022-10-14 21:56:37,277 - boto - ERROR - b'\nAuthFailureAWS was not able to validate the provided access credentials*********************************'
2022-10-14 21:56:37,290 - root - ERROR - Error: Graffiti Monkey encountered the following error: EC2ResponseError: 401 Unauthorized
2022-10-14T17:56:37.290-04:00
2022-10-14T17:56:37.290-04:00 AuthFailureAWS was not able to validate the provided access credentials*****************************
2022-10-14 21:56:37,330 - botocore.credentials - INFO - Found credentials in environment variables.
2022-10-14 21:56:37,550 - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): sns.us-east-1.amazonaws.com
I can confirm, it appears the lambda excution role and iam policies are all correct. This is not processing the EBS / Snapshots as intended in this state. Also, I think some of the requirements and potentially boto usage will have to be updated to Python3 capable utilities and boto3.
Last: the iam policy in the CloudFormation template... I also changed the resources permissions from:
"Resource": [
"arn:aws:ec2:::instance/",
"arn:aws:ec2:::snapshot/",
"arn:aws:ec2:::volume/"
to:
"Resource": [
"arn:aws:ec2:*:*:instance/*",
"arn:aws:ec2:*:*:snapshot/*",
"arn:aws:ec2:*:*:volume/*"
**** change on the snapshot line. Not sure if it should be :::snapshot or ::*:snapshot. I thought the latter was correct... but might be wrong.
I hope this information helps for Python3. Thank you for looking into this... it's a great utility when running (one of the best utilities imo).
—
Reply to this email directly, view it on GitHub <#22 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACD6CAI7KYJGK6GGQQZLPILWDLAVFANCNFSM6AAAAAARFQXQAY>.
You are receiving this because you commented.
|
Lambda no longer allows Python2.7. We started looking at upgrading graffiti_monkey to support Python3+. I think requirements and several pieces are going to have to be updated. After updating several "except KeyError, e" and "except Exception, e" to "except KeyError as e" and "except Exception as e" in multiple files for Python3 compatibility, we were able to get beyond several of the errors. I'm not sure if there are other syntax errors, however... there do not appear to be. The last error we cannot get past is:
[ERROR] Runtime.ImportModuleError: Unable to import module 'service': No module named 'cache'
Traceback (most recent call last):
This is not a problem when we are able to use python2.7. I do not see anything trying to import cache in the service.py or the files under the graffiti_monkey folder. However, cache.py does exist under that folder. I'm not sure why the service.py is unable to be imported. Also, Several of the requirements versions appear to not be python3+ compatible... but still digging there.
Are there any plans to update this utility? We are still digging to see if we can get this to work.
The text was updated successfully, but these errors were encountered: