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

Build awsme for the Lambda environment #3

Closed
joseph-wortmann opened this issue Mar 7, 2019 · 8 comments
Closed

Build awsme for the Lambda environment #3

joseph-wortmann opened this issue Mar 7, 2019 · 8 comments

Comments

@joseph-wortmann
Copy link
Contributor

  • Amazon Web Services Cloud Watch Metrics library version: 0.2.5
  • Python version: 3.6, 3.7
  • Operating System: AWS Lambda

Description

The awsme library has as an install_includes boto3. This is perfect and appropriate for most applications of the library, but it does not work well for AWS Lambda applications of the library.

The reason is as follows: boto3 and the AWS API changes pretty rapidly, and AWS updates the Lambda runtime in sync with those changes. Best practices for Lambda functions are to NOT include boto3 in the lambda function package to prevent weird incompatibilities between the AWS API and older versions of boto3. Also, it prevents MAJOR package bloat.

What I've done in the past is fork project that have boto3, remove boto3 as a dependency, and upload the new build to pypi as lambda-. However, this is sub-optimal, obviously, as it only loosely tracks the primary project.

Could we alter the build to both produce awsme for standard applications and in the same run produce lambda-awsme for Lambda applications?

@peterdemin
Copy link
Owner

Interesting. I think we can make a major release with boto3 in extras_require.
So that pip install awsme will not install boto3, but pip install awsme[boto3] will.
What do you think? Can you PR that?
Also, I noticed, that in the previous PR the requirements files intentions changed. Please run tox -e upgrade3 to fix it.

@joseph-wortmann
Copy link
Contributor Author

Yeah, I can PR that tonight, no problem! That is a great solution - I've learned something new.

@joseph-wortmann
Copy link
Contributor Author

I'm running the tox stuff now. PR is available for you

@peterdemin
Copy link
Owner

But don't bumpversion inside the PR, it has to be done in the master branch so that TravisCI will make a release.

@joseph-wortmann
Copy link
Contributor Author

Got it.

Also - need a bit of help on the extras_require. I've got boto3 extracted from the standard requires, but I'm not sure how to get tox to install it so that it is available for the test runs. Any pointers are very welcome.

@peterdemin
Copy link
Owner

I didn't undertand the problem. Could you please open a PR so I can see what's wrong?

@joseph-wortmann
Copy link
Contributor Author

Yep - on it.

@peterdemin
Copy link
Owner

Enjoy v1.0.0

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

2 participants