-
Notifications
You must be signed in to change notification settings - Fork 452
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
Incompatible with aws lambda function. The lambda function only allows customer to touch the "/tmp/" folder. #439
Comments
You can use an ec2 instance in the meantime |
Sorry to post a opinion / suggestion instead of a suggestion / fix to your issue. |
For anyone looking for a solution.. you can try setting the
@Adelantado Sometimes it's better not to comment, particularly when there are many people that have created issues for this exact problem. The problem is exactly the opposite of what you mentioned--that the library is setup in a way to fit an individual's needs (original developer) rather than provide flexibility to the users of the library. This login/authentication mechanism can definitely be improved. It returns a dictionary of values which could theoretically later be used to authenticate API calls without having to login again, yet the library doesn't provide a way for you to later use the dict returned (outside of manually writing them to a pickle file at the expected file location yourself). A much more flexible approach could've been to provide a way for the user to provide the authentication dict to the login method or have an additional method to set the |
Dear @mm0: I read you, understand and will disagree with you till my ears falls off. Stick to the script .... think of it as a wheel: U have decided, all on your own to "borrow" this "wheel" and used as you please. Now ... if you somehow find yourself stuck and ain't really sure how to make this wheel turn, you have come to the right place. Plenty of smart, dedicated people willing to post, reply, share information and collaborate to fix any new issues that may arise with the normal usage and functionality of the "basic" wheel you borrowed. So to keep a long story short .... I do not think this is the place to fix or to help fix your or anybody's "specific needs" in relation to any kind of functionality to be developed/implemented outside the basic specs of the wheel. I will further elaborate and add that: if U anna customize the wheel and make it a "fancy" wheel ... just my humble opinion please have a ball, but this ain't the place. As a final thought I will share, and just in case you still had any doubts, that I can not think of one single reason any kind of AWS integration issue belongs in here. |
So I read what you guys said, and I understand both arguments, but lets get back to the issue. The issue is the library does not support AWS lambdas, but I have found a fix: The problem is not just the path of the home directory, but also the fact lambdas aren't always the same every time you fire it. So you can't store it on the lambda at all. You could do a EFS solution, but its easier to modify this authentication file. What I did was make a new authentication file which is below. This still is used in conjunction with this robinhood library, but allows you to used database stored credentials as well.
` I now simply use the library like this:
This allows you to insert the saved credentials each time the session is made. |
robin_stocks/robin_stocks/robinhood/authentication.py
Line 83 in 6dc9dac
I attempt to deploy the script to aws lambda function and find out this incompatibility. I finally create a custom version of login function to make it work. Maybe we can add another field of "path" to let user specify when this is used with aws lambda function.
The text was updated successfully, but these errors were encountered: