Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
90
90%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
Complete deployment patterns for PHP Lambda functions using Serverless Framework and AWS SAM.
# serverless.yml
service: php-lambda-api
provider:
name: aws
runtime: php-82
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'us-east-1'}
memorySize: 512
timeout: 20
environment:
APP_ENV: ${self:provider.stage}
AWS_REGION: ${self:provider.region}
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
Resource: '*'
functions:
api:
handler: public/index.php
description: PHP Lambda API
events:
- httpApi: '*'
plugins:
- ./vendor/bref/bref# serverless.yml
custom:
stage: ${opt:stage, 'dev'}
# Development settings
dev:
memorySize: 256
timeout: 10
provisioned: 0
# Production settings
prod:
memorySize: 1024
timeout: 30
provisioned: 5
provider:
environment:
STAGE: ${self:custom.stage}
functions:
api:
handler: public/index.php
memorySize: ${self:custom.${self:custom.stage}.memorySize}
timeout: ${self:custom.${self:custom.stage}.timeout}
provisionedConcurrency: ${self:custom.${self:custom.stage}.provisioned}functions:
# API function
api:
handler: public/index.php
events:
- httpApi:
path: /{proxy+}
method: ANY
# Background processing
process:
handler: functions/process.php
timeout: 300
events:
- sqs:
arn: !GetAtt MyQueue.Arn
# Scheduled task
cleanup:
handler: functions/cleanup.php
timeout: 900
events:
- schedule: cron(0 3 * * ? *)# serverless.yml
package:
layers:
- arn:aws:lambda:us-east-1:123456789012:layer:php-extensions:1
functions:
api:
handler: public/index.php
layers:
- arn:aws:lambda:us-east-1:123456789012:layer:php-extensions:1# template.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: PHP Lambda API
Parameters:
Stage:
Type: String
Default: dev
AllowedValues:
- dev
- staging
- prod
Globals:
Function:
Runtime: php-82
Timeout: 20
MemorySize: 512
Environment:
Variables:
APP_ENV: !Ref Stage
Resources:
PhpFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./
Handler: public/indexphp
Events:
Api:
Type: HttpApi
Properties:
ApiId: !Ref ApiGateway
Path: /{proxy+}
Method: ANY
RootApi:
Type: HttpApi
Properties:
ApiId: !Ref ApiGateway
Path: /
Method: ANY
ApiGateway:
Type: AWS::ApiGatewayV2::Api
Properties:
ProtocolType: HTTP
StageName: !Ref Stage
UsersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: !Sub users-${Stage}
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
Outputs:
ApiUrl:
Description: API URL
Value: !Sub https://${ApiGateway}.execute-api.${AWS::Region}.amazonaws.com/${Stage}# Build the function
sam build
# Deploy
sam deploy --guided
# Local testing
sam local start-api# .github/workflows/deploy.yml
name: Deploy PHP Lambda
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install dependencies
run: composer install --no-interaction
- name: Run tests
run: vendor/bin/phpunit
deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Install Serverless
run: npm install -g serverless
- name: Install dependencies
run: composer install --no-dev --optimize-autoloader
- name: Deploy to AWS
run: vendor/bin/bref deploy --stage prod
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}# .gitlab-ci.yml
stages:
- test
- deploy
test:
stage: test
image: php:8.2-cli
script:
- composer install
- vendor/bin/phpunit
deploy:
stage: deploy
image: php:8.2-cli
script:
- npm install -g serverless
- composer install --no-dev
- vendor/bin/bref deploy --stage $CI_ENVIRONMENT_SLUG
environment:
name: review/$CI_COMMIT_REF_SLUG
only:
- develop
except:
- main
deploy-prod:
stage: deploy
image: php:8.2-cli
script:
- npm install -g serverless
- composer install --no-dev
- vendor/bin/bref deploy --stage prod
environment:
name: production
only:
- main# buildspec.yml
version: 0.2
phases:
install:
runtime-versions:
php: 8.2
commands:
- composer install --no-dev --optimize-autoloader
build:
commands:
- echo "Building..."
post_build:
commands:
- vendor/bin/bref deploy --stage ${STAGE}
env:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}# serverless.yml
custom:
environments:
dev:
domain: dev-api.example.com
stage: dev
staging:
domain: staging-api.example.com
stage: staging
prod:
domain: api.example.com
stage: prod
provider:
stage: ${self:custom.environments.${self:provider.stage}.stage}
functions:
api:
handler: public/index.php
events:
- httpApi:
path: /{proxy+}
method: ANY
authorizer:
type: jwt
identitySource: $request.header.Authorization
jwt:
audience:
- ${self:custom.environments.${self:provider.stage}.clientId}
issuer:
- https://${self:custom.environments.${self:provider.stage}.authDomain}# Deploy to dev
vendor/bin/bref deploy --stage dev
# Deploy to staging
vendor/bin/bref deploy --stage staging
# Deploy to production
vendor/bin/bref deploy --stage prod# serverless.yml
plugins:
- ./vendor/bref/bref
- serverless-domain-manager
custom:
customDomain:
domainName: api.example.com
stage: ${self:provider.stage}
basePath: ''
certificateArn: arn:aws:acm:us-east-1:123456789012:certificate/cert-id
createRoute53Record: true# serverless.yml
resources:
Resources:
ApiDomain:
Type: AWS::ApiGatewayV2::DomainName
Properties:
DomainName: api.example.com
DomainNameConfigurations:
- CertificateArn: arn:aws:acm:us-east-1:123456789012:certificate/cert-id
EndpointType: REGIONAL
SecurityPolicy: TLS_1_2# serverless.yml
functions:
api:
handler: public/index.php
loggingConfig:
level: error
retentionInDays: 7# serverless.yml
provider:
tracing:
api: true
functions:
api:
handler: public/index.php
tracing: Activedocs
plugins
developer-kit-ai
developer-kit-aws
agents
docs
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
aws-cloudformation-bedrock
aws-cloudformation-cloudfront
aws-cloudformation-cloudwatch
aws-cloudformation-dynamodb
aws-cloudformation-ec2
aws-cloudformation-ecs
aws-cloudformation-elasticache
references
aws-cloudformation-iam
references
aws-cloudformation-lambda
aws-cloudformation-rds
aws-cloudformation-s3
aws-cloudformation-security
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
references
developer-kit-core
agents
commands
skills
developer-kit-devops
developer-kit-java
agents
commands
docs
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
clean-architecture
graalvm-native-image
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
references
unit-test-controller-layer
unit-test-exception-handler
references
unit-test-json-serialization
unit-test-mapper-converter
references
unit-test-parameterized
unit-test-scheduled-async
references
unit-test-service-layer
references
unit-test-utility-methods
unit-test-wiremock-rest-api
references
developer-kit-php
developer-kit-project-management
developer-kit-python
developer-kit-specs
commands
docs
hooks
test-templates
tests
skills
developer-kit-tools
developer-kit-typescript
agents
docs
hooks
rules
skills
aws-cdk
aws-lambda-typescript-integration
better-auth
clean-architecture
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
shadcn-ui
tailwind-css-patterns
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities
references
github-spec-kit