aws-lambda-php-integration
Provides AWS Lambda integration patterns for PHP with Symfony using the Bref framework. Creates Lambda handler classes, configures runtime layers, sets up SQS/SNS event triggers, implements warm-up strategies, and optimizes cold starts. Use when deploying PHP/Symfony applications to AWS Lambda, configuring API Gateway integration, implementing serverless PHP applications, or optimizing Lambda performance with Bref. Triggers include "create lambda php", "deploy symfony lambda", "bref lambda aws",
Security Assessment
About aws-lambda-php-integration
This skill provides patterns for deploying PHP and Symfony applications to AWS Lambda using the Bref framework, plus a lighter raw-PHP approach for minimal-overhead handlers. It solves the practical challenges of running PHP serverless: creating Lambda handler classes, wiring API Gateway integration, configuring SQS/SNS event triggers, and reducing cold-start latency (Bref targeting under two seconds, raw PHP under 500ms). It gives developers ready-to-adapt project structures for both Symfony-with-Bref and raw-PHP layouts.
The skill covers approach selection (a comparison table of cold start, best use, and complexity), implementation snippets for entry points, and cold-start optimization techniques such as lazy loading, disabling unused Symfony features, optimizing the Composer autoloader, and caching AWS SDK clients at the function level. It documents memory and timeout guidance, dependency configuration, and error handling. A set of reference files extends this into serverless-framework and AWS SAM deployment templates, CI/CD pipelines (GitHub Actions, GitLab CI, AWS CodePipeline), multi-stage deployments, custom domains, testing, and best practices. Deployment examples pass AWS credentials through standard CI secret mechanisms (for example GitHub Actions secrets) rather than hardcoding them.
It targets PHP and Symfony backend engineers and DevOps practitioners who are building new serverless functions, migrating existing Symfony apps to Lambda, or tuning Lambda performance. The skill declares Read, Write, Edit, Glob, Grep, and Bash tools, meaning it can scaffold files and run build/deploy commands; the operations shown are standard serverless build and deploy steps with credentials supplied via CI secrets.
FAQ
Which deployment approaches does it support?
Two: the Bref framework for full-featured Symfony apps and APIs, and a raw-PHP approach for simple handlers with maximum control and lower cold start. A comparison table helps you choose.
What are the prerequisites?
A PHP 8.2+ project with Composer, the Bref framework, and AWS deployment tooling such as the Serverless Framework or AWS SAM. Reference files include GitHub Actions, GitLab CI, and CodePipeline examples.
How does it handle cold starts?
It recommends lazy loading heavy services, disabling unused Symfony features like validation and annotations, using classmap autoload optimization for production, and caching AWS SDK clients at the function level.
How are AWS credentials managed in the examples?
Deployment examples read AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from CI secret stores (for example GitHub Actions secrets or GitLab CI variables) rather than embedding them in code.
Can the skill run commands on my machine?
It declares Bash access and shows build/deploy commands (composer install, bref deploy, sam build). These are standard serverless workflow steps; you control when they run.
Install aws-lambda-php-integration
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
giuseppe-trisciuoglio/developer-kit