AWS Lambda

June 26, 2024 ยท View on GitHub

Table of content

Configuration

SettingEnv varDefault valueDescription
aws.accesskeyidAWS_ACCESSKEYIDAWS access key (optional if you use EC2 Instance Profile)
aws.secretaccesskeyAWS_SECRETACCESSKEYAWS secret access key (optional if you use EC2 Instance Profile)
aws.regionAWS_REGIONAWS region (by default, the metadata are used to get it)
aws.rolearnAWS_ROLEARNAWS role to assume (optional if you use EC2 Instance Profile)
aws.externalidAWS_EXTERNALIDExternal id for the role to assume (optional if you use EC2 Instance Profile)
aws.checkidentityAWS_CHECKIDENTITYtrueCheck the identity credentials, set to false for locale developments
aws.lambda.functionnameAWS_LAMBDA_FUNCTIONNAMELambda function name, if not empty, AWS Lambda output is enabled
aws.lambda.minimumpriorityAWS_LAMBDA_MINIMUMPRIORITY"" (= debug)Minimum priority of event for using this output, order is emergency,alert,critical,error,warning,notice,informational,debug or ""

Note

The Env var values override the settings from yaml file.

Example of config.yaml

aws:
  # accesskeyid: "" # aws access key (optional if you use EC2 Instance Profile)
  # secretaccesskey: "" # aws secret access key (optional if you use EC2 Instance Profile)
  # region : "" # aws region (by default, the metadata are used to get it)
  # rolearn: "" # aws role to assume (optional if you use EC2 Instance Profile)
  # externalid: "" # external id for the role to assume (optional if you use EC2 Instance Profile)
  # checkidentity: true # check the identity credentials, set to false for locale developments (default: true)
  lambda:
    functionname : "" # Lambda function name, if not empty, AWS Lambda output is enabled
    # minimumpriority: "" # minimum priority of event for using this output, order is emergency|alert|critical|error|warning|notice|informational|debug or "" (default)

Additional info

Note

When using this AWS output you will need to set the AWS keys or role with some permissions.

Lambda Sample IAM Policy

{
  "Version": "2012-10-17",
  "Id": "lambda",
  "Statement": [
    {
      "Sid": "invoke",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "lambda:InvokeFunction",
      "Resource": "*"
    }
  ]
}

Screenshots