Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lambda Laravel Package

async-aws/lambda

Async AWS Lambda client for PHP with promise-based async invocations, typed request/response objects, streaming payload support, and credential/region configuration. Lightweight alternative to the AWS SDK for calling and managing Lambda functions.

View on GitHub
Deep Wiki
Context7

[READ ONLY] Lambda client

Frequently asked questions about Lambda
How do I install async-aws/lambda in a Laravel app?
Install it with Composer using composer require async-aws/lambda. The package requires PHP 8.2+ and pulls in async-aws/core for credentials, regions, and HTTP transport. It does not ship a Laravel service provider, so you typically instantiate or bind AsyncAws\Lambda\LambdaClient in your application container.
Is async-aws/lambda compatible with Laravel 10 and Laravel 11?
async-aws/lambda is framework-agnostic and has no hard Laravel dependency. It is compatible with Laravel applications running PHP 8.2+, which includes Laravel 10 and Laravel 11 projects on supported PHP versions. You integrate it manually through the service container rather than a package-specific Laravel provider.
How do I configure AWS credentials and region for LambdaClient in Laravel?
Use async-aws/core credential providers backed by environment variables such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION, or use IAM roles in production. Pass the region explicitly when constructing LambdaClient or centralize it in a Laravel config file. Avoid hardcoding credentials and bind a configured client as a singleton in a service provider.
Does async-aws/lambda include a Laravel service provider or facade?
No, async-aws/lambda does not provide a built-in Laravel service provider or facade. You can register LambdaClient as a singleton in AppServiceProvider and inject it into your services or jobs. This keeps configuration centralized while using the framework-agnostic AsyncAws client directly.
How do I invoke a Lambda function asynchronously with async-aws/lambda?
Use LambdaClient::invoke and set InvocationType to Event for fire-and-forget asynchronous Lambda execution. AsyncAws is built on async-aws/core and supports promise-based HTTP requests, but you should avoid blocking Laravel web requests on unresolved operations. For reliability, wrap the invocation in a queued job and monitor failures through Laravel logging.
Can I call AWS Lambda from a Laravel queue job?
Yes, wrapping Lambda invocations in Laravel queue jobs is a practical integration pattern. The job can call LambdaClient, use Event invocation type for asynchronous Lambda work, and rely on Laravel queue retries and failed-job handling. This also keeps long-running or error-prone AWS calls out of synchronous HTTP requests.
How should I handle AsyncAwsException errors in Laravel?
Catch AsyncAws\Core\Exception\AsyncAwsException around Lambda client calls, log the AWS error details, and convert it into a Laravel-friendly exception or response. For application-wide handling, map AsyncAws exceptions in your exception handler or a dedicated service layer. Avoid letting raw AWS exceptions leak directly into user-facing responses.
How do I test Lambda invocations in a Laravel app using async-aws/lambda?
Bind a mock or test double of LambdaClient into Laravel's container and unit test the service or job that performs the invocation. Keep most tests isolated from real AWS, and use integration tests against LocalStack or a dedicated AWS sandbox only when needed. Assert that payloads, function names, invocation types, and error handling behave as expected.
What production considerations matter when using async-aws/lambda in Laravel?
Configure credentials through IAM roles or environment variables, centralize region settings, and set sensible HTTP timeouts and retry behavior. Prefer queued jobs for asynchronous Lambda calls so web requests stay responsive. Monitor CloudWatch logs, Laravel logs, and failed jobs, and validate custom AWS regions before deploying. Also watch for Composer dependency conflicts with Laravel's HTTP or Symfony components.
How does async-aws/lambda compare to aws/aws-sdk-php for Laravel?
async-aws/lambda is a focused Lambda client with typed request and response objects, streaming payload support, and async-first design through async-aws/core. It is lighter than the full aws/aws-sdk-php package when you only need Lambda calls. Choose aws/aws-sdk-php if you need broad AWS service coverage from one SDK, or AsyncAws if you prefer a smaller, typed client for Lambda-specific workloads.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator
manelgavalda/enrollment_mobile
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics