AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 8 1 -fpm timeout: 28 # in seconds (API Gateway has a timeout of 2 9 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 8 1 -console timeout: 720 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref Laravel public/index.php Laravel Serverless Framework $ composer require bref/bref bref/laravel-bridge update-with-dependencies $ php artisan vendor:publish --tag=serverless-config
AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 81 -fpm timeout: 2 8 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 81 -console timeout: 7 20 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref AWS IAM Role Serverless Framework
AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 81 -fpm timeout: 2 8 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 81 -console timeout: 7 20 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref Exclude node_modules tests ⾒
AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 81 -fpm timeout: 2 8 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 81 -console timeout: 7 20 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref Http Laravel API Gateway AWS Lambda Laravel
AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 81 -fpm timeout: 2 8 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 81 -console timeout: 7 20 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref artisan Lambda
AWS region in which to deploy (us-east- 1 is the default) region: us-east- 1 # Environment variables environment: APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' - '!resources/assets/**' - '!storage/**' - '!tests/**' functions: # This function runs the Laravel website/API web: handler: public/index.php runtime: php- 81 -fpm timeout: 2 8 # in seconds (API Gateway has a timeout of 29 seconds) events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan runtime: php- 81 -console timeout: 7 20 # in seconds # Uncomment to also run the scheduler every minute #events: # - schedule: # rate: rate( 1 minute) # input: '"schedule:run"' plugins: # We need to include the Bref plugin - ./vendor/bref/bref Serverless Framework bref