# Can be overridden for each function separately inside the functions block, see below on page. For 'manual', see example in hello function below (syntax for both is identical # Default memory size for functions (default: 1024MB) memorySize: 512 # Default timeout for functions (default: 6 seconds) # Note: API Gateway has a maximum timeout of 30 seconds timeout: 10 # Function environment variables environment: APP_ENV_VARIABLE: FOOBAR # Duration for CloudWatch log retention (default: forever). AWS default is auto this can either be 'auto' or 'onFunctionUpdate'. Some function settings can be defined for all functions inside the provider key: # serverless.yml provider: runtime: nodejs14.x runtimeManagement: auto # optional, set how Lambda controls all functions runtime. apiGateway: true # Optional, can be true (true equals 'Active'), 'Active' or 'PassThrough' lambda: true General function settings disableRollback: true rollbackConfiguration: MonitoringTimeInMinutes: 20 RollbackTriggers: - Arn: arn:aws:cloudwatch:us-east-1:000000000000:alarm:health Type: AWS::CloudWatch::Alarm - Arn: arn:aws:cloudwatch:us-east-1:000000000000:alarm:latency Type: AWS::CloudWatch::Alarm tracing: # Can only be true if API Gateway is inside a stack. To be used for non-production environments. notificationArns: - 'arn:aws:sns:us-east-1:XXXXXX:mytopic' stackParameters: - ParameterKey: 'Keyname' ParameterValue: 'Value' # Disable automatic rollback by CloudFormation on failure. # serverless.yml # Stage parameters params: # Values for the "prod" stage prod: my-parameter: foo # Values for the "dev" stage dev: my-parameter: bar Provider General settings # serverless.yml provider: name: aws # Default stage (default: dev) stage: dev # Default region (default: us-east-1) region: us-east-1 # The AWS profile to use to deploy (default: "default" profile) profile: production # Use a custom name for the CloudFormation stack stackName: custom-stack-name # Optional CloudFormation tags to apply to APIs and functions tags: foo: bar baz: qux # Optional CloudFormation tags to apply to the stack stackTags: key: value # Method used for CloudFormation deployments: 'changesets' or 'direct' (default: changesets) # See deploymentMethod: direct # List of existing Amazon SNS topics in the same region where notifications about stack events are sent. Learn more about stage parameters in the Parameters documentation. env files (default: false) # See useDotenv: true # 'warn' reports deprecations on the go, 'error' will result with an exception being thrown on first approached deprecation deprecationNotificationMode: warn:summary # Disable deprecations by their codes (default: empty) # See disabledDeprecations: - DEP_CODE_1 # Deprecation code to disable - '*' # Disable all deprecation messages Parameters Root properties # serverless.yml # Service name service: myservice # Framework version constraint (semver constraint): '3', '^2.33' frameworkVersion: '3' # Configuration validation: 'error' (fatal error), 'warn' (logged to the output) or 'off' (default: warn) # See configValidationMode: error # Load environment variables from. Here is a list of all available properties in serverless.yml when the provider is set to aws.
0 Comments
Leave a Reply. |