diff --git a/stubs/serverless.yml b/stubs/serverless.yml index 3d96dcc..ce2fc0a 100644 --- a/stubs/serverless.yml +++ b/stubs/serverless.yml @@ -4,12 +4,12 @@ provider: name: aws # The AWS region in which to deploy (us-east-1 is the default) region: us-east-1 - # The stage of the application, e.g. dev, production, staging… ('dev' is the default) - stage: dev - runtime: provided.al2 + # Environment variables + environment: + APP_ENV: production # Or use ${sls:stage} if you want the environment to match the stage package: - # Directories to exclude from deployment + # Files and directories to exclude from deployment patterns: - '!node_modules/**' - '!public/storage' @@ -22,24 +22,21 @@ functions: # This function runs the Laravel website/API web: handler: public/index.php + runtime: php-81-fpm timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds) - layers: - - ${bref:layer.php-81-fpm} events: - httpApi: '*' # This function lets us run artisan commands in Lambda artisan: handler: artisan + runtime: php-81-console timeout: 720 # in seconds - layers: - - ${bref:layer.php-80} # PHP - - ${bref:layer.console} # The "console" layer - events: - # We also schedule this function to run the scheduler every minute - - schedule: - rate: rate(1 minute) - input: '"schedule:run"' + # 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