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

Add Lambda PHP/Bref CDK sample #207

Merged
merged 8 commits into from
Feb 27, 2023
Merged

Add Lambda PHP/Bref CDK sample #207

merged 8 commits into from
Feb 27, 2023

Conversation

joe4dev
Copy link
Contributor

@joe4dev joe4dev commented Feb 7, 2023

Simple PHP/Bref serverless application using a shared Lambda layer deployable with AWS CDK to LocalStack.

Preview

https://github.com/localstack/localstack-pro-samples/tree/lambda-php-bref-cdk-app/lambda-php-bref-cdk-app

Demonstrates

Related issues

Open Tasks

  • Fix build for serverless-lambda-layers after bumping Node version to v14
  • Add summary to the top-level readme
  • Fix build for qldb-ledger-queries after breaking dependency update

@joe4dev joe4dev requested a review from HarshCasper February 7, 2023 16:48
@joe4dev
Copy link
Contributor Author

joe4dev commented Feb 7, 2023

@HarshCasper The PHP/Bref with and with fpm are kind of two examples. How should we present them?

  • PHP/Bref without fpm deployed with CDK in this example is more self-containing (motivated by a support case)
  • PHP/Bref with fpm deployed with Serverless is probably more common. However, the base Laravel project comes with a lot of boilerplate code. Hence, we probably don't want to copy it here 🤔

Fixes for the mentioned issues are in the works ...
Also remove unsupported `LAMBDA_DOCKER_FLAGS` by the Docker SDK client
The AWS CDK requires at least Node v14 aws/aws-cdk@d0a27c1
Trying to bump conservatively to Node v14: https://github.com/localstack/localstack-pro-samples/blob/master/.github/workflows/makefile.yml#L21

Even for v14, maintenance EOL is coming soon: https://github.com/nodejs/Release
Requires more follow up work before migrating to v3:

```
Serverless: Deprecation warnings:

Variables resolver reports following resolution errors:
  - Cannot resolve variable at "resources.Resources.ApiGatewayRestApi.Properties.Name": Value not found at "self" source,
  - Cannot resolve variable at "resources.Outputs.RestApiId.Export.Name": Value not found at "self" source
From a next major this will be communicated with a thrown error.
Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER

Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release.
Switch to it now by setting "provider.lambdaHashingVersion" to "20201221".
While it is highly encouraged to upgrade to new algorithm, you can still use the old approach by setting "provider.lambdaHashingVersion" to "20200924".
More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2
```
@HarshCasper HarshCasper merged commit b5f1db8 into master Feb 27, 2023
@HarshCasper HarshCasper deleted the lambda-php-bref-cdk-app branch February 27, 2023 16:00
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.

2 participants