config_file_example.rst 3.51 KB

The Config File

The config file is at the heart of kappa. It is what describes your functions and drives your deployments. This section provides a reference for all of the elements of the kappa config file.

Example

Here is an example config file showing all possible sections.

Explanations:

Line Number Description
2 This name will be used to name the function itself as well as any policies and roles created for use by the function.
3 A map of environments. Each environment represents one possible deployment target. For example, you might have a dev and a prod. The names can be whatever you want but the environment names are specified using the --env option when you deploy.
5 The profile name associated with this environment. This refers to a profile in your AWS credential file.
6 The AWS region associated with this environment.
7 This section defines the elements of the IAM policy that will be created for this function in this environment.
9 Each resource your function needs access to needs to be listed here. Provide the ARN of the resource as well as a list of actions. This could be wildcarded to allow all actions but preferably should list the specific actions you want to allow.
15 If your Lambda function has any event sources, this would be where you list them. Here, the example shows a Kinesis stream but this could also be a DynamoDB stream, an SNS topic, or an S3 bucket.
18 For Kinesis streams and DynamoDB streams, you can specify the starting position (one of LATEST or TRIM_HORIZON) and the batch size.
35 This section contains settings specify to your Lambda function. See the Lambda docs for details on these.