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

Expanded README on how to build for Amazon Linux 2 x86 or ARM, includ… #360

Merged
merged 3 commits into from
Nov 3, 2021

Conversation

coltonweaver
Copy link
Contributor

Issue #, if available: #17

Description of changes:

  • Included instructions on how to produce x86 and ARM binaries for Lambda functions using provided.al2.
  • Included changes to show how to produce these binaries for provided.al2 using Docker on MacOS for cross-compilation.
  • Fixed outdated references in example at the beginning of the file.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

Copy link
Contributor

@bahildebrand bahildebrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work!

README.md Outdated
For [a custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), AWS Lambda looks for an executable called `bootstrap` in the deployment package zip. Rename the generated `basic` executable to `bootstrap` and add it to a zip archive.

NOTE: Depending on the target you used above, you'll find the provided basic under the corresponding directory. In the following example, we've compiled for x86_64-unknown-linux-gnu.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a bit confusing in its current form. basic -> basic executable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh, that's a good call. I will push a fix for this in a minute.

@coltonweaver coltonweaver merged commit dcc33ea into master Nov 3, 2021
@coltonweaver coltonweaver deleted the cbweaver-readme-updates branch November 3, 2021 01:49

**Building for Amazon Linux 2**

Decide which target you'd like to use. For ARM Lambda Functions you'll want to use `aarch64-unknown-linux-gnu` and for x86 Lambda Functions you'll want to use `x86_64-unknown-linux-gnu`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fairly certain these steps will not work for everyone. AL2 is currently using Glibc 2.26, but if the user's Glibc is newer, this will lead to the lambda crashing on startup. So at the least, I think this should mention that the user should be aware of this

Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the suggestion. I think that's reasonable to add. I'll look into opening another PR tonight

@nmoutschen nmoutschen added the 0.5 label Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants