Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Switch to new Lambda provider implementation #6724

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

Merged
merged 10 commits into from
Mar 23, 2023
Merged

Switch to new Lambda provider implementation #6724

merged 10 commits into from
Mar 23, 2023

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Aug 22, 2022

Summary

This PR should remain minimal in terms of code changes, and is mostly used for keeping track of the PRs regarding the new lambda provider going directly into master and for tracking test failure rates against the new provider.

PRs

The following PRs have been created to fully implement the new Lambda provider:

Tasks

  • Initial core runtime implementation of the new provider
  • Refactor package imports
  • replace run_lambda calls by botocore invocations / common interface
  • extend integration tests for full API coverage
  • Version & Alias CRUD
  • Full API CRUD
  • Alias routing
  • Lambda URL port
  • Hot reloading
  • Permissions

@dfangl dfangl temporarily deployed to localstack-ext-tests August 22, 2022 14:55 Inactive
@github-actions
Copy link

github-actions bot commented Aug 22, 2022

LocalStack integration with Pro

0 tests   - 1 827   0 ✔️  - 1 481   0s ⏱️ - 1h 4m 39s
0 suites  -        1   0 💤  -    345 
0 files    -        1   0  -        1 

Results for commit 085d93c. ± Comparison against base commit fad6714.

♻️ This comment has been updated with latest results.

@shadowhand
Copy link

shadowhand commented Aug 25, 2022

I was linked to this PR from this Slack thread, and I wanted to drop a quick note about user settings. From what I have gathered, primarily from the Bref project, AWS Lambda executes code with nobody:nobody user/group.

This does not seem to be the case with Localstack Lambda, because when I try to execute my functions (with the PHP-FPM layer from Bref) they fail saying that "no user is defined". The error happens in the PHP-FPM layer, but the exact same layer has no issues in AWS proper. After discussing this with the Bref community, it seems this error will only happen when the Lambda environment executes as someone other than nobody.

If nothing else, it would be helpful to have LAMBDA_DOCKER_FLAGS support the --user flag, which it currently does not.

@thrau
Copy link
Member

thrau commented Sep 1, 2022

thanks Woody @shadowhand, this is helpful feedback we'll consider!

@joe4dev
Copy link
Member

joe4dev commented Feb 20, 2023

@shadowhand Thank you for reporting your findings 🙏 I created a separate issue to track the progress on this lambda runtime parity issue #7722

I was linked to this PR from this Slack thread, and I wanted to drop a quick note about user settings. From what I have gathered, primarily from the Bref project, AWS Lambda executes code with nobody:nobody user/group.

This does not seem to be the case with Localstack Lambda, because when I try to execute my functions (with the PHP-FPM layer from Bref) they fail saying that "no user is defined". The error happens in the PHP-FPM layer, but the exact same layer has no issues in AWS proper. After discussing this with the Bref community, it seems this error will only happen when the Lambda environment executes as someone other than nobody.

If nothing else, it would be helpful to have LAMBDA_DOCKER_FLAGS support the --user flag, which it currently does not.

Your suggested workaround is now supported and mentioned here: #7722 (comment)
This enables running PHP/Bref applications on LocalStack.

@dfangl dfangl force-pushed the asf-lambda-provider branch from 3882996 to 478b79a Compare March 20, 2023 09:15
@dfangl dfangl temporarily deployed to localstack-ext-tests March 20, 2023 09:15 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 20, 2023 09:25 — with GitHub Actions Inactive
@dominikschubert dominikschubert changed the base branch from master to v2 March 21, 2023 15:25
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests March 21, 2023 19:14 — with GitHub Actions Inactive
@thrau thrau force-pushed the v2 branch 2 times, most recently from df12a9e to 6e81652 Compare March 22, 2023 11:35
@dfangl dfangl force-pushed the asf-lambda-provider branch from d9eacc8 to e900ba3 Compare March 22, 2023 13:53
@dfangl dfangl temporarily deployed to localstack-ext-tests March 22, 2023 13:53 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 22, 2023 15:43 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 22, 2023 16:54 — with GitHub Actions Inactive
@dominikschubert dominikschubert temporarily deployed to localstack-ext-tests March 23, 2023 12:19 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 23, 2023 13:02 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 23, 2023 13:32 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 23, 2023 14:33 — with GitHub Actions Inactive
@dfangl dfangl temporarily deployed to localstack-ext-tests March 23, 2023 15:16 — with GitHub Actions Inactive
@dominikschubert dominikschubert marked this pull request as ready for review March 23, 2023 16:17
Copy link
Member

@thrau thrau left a comment

Choose a reason for hiding this comment

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

YES PLEASE

@dfangl dfangl merged commit 81a9dfd into v2 Mar 23, 2023
@dfangl dfangl deleted the asf-lambda-provider branch March 23, 2023 16:19
alexrashed pushed a commit that referenced this pull request Mar 23, 2023
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

Successfully merging this pull request may close these issues.

6 participants