Skip to content

Collector "AWS-Lambda" Configuration Manual

Before reading this article, please read the following first:

Before using this collector, you must install the 'Integration Core package' and its associated third-party dependency packages

1. Configuration Structure

The configuration structure for this collector is as follows:

Field Type Required Description
regions list Required List of regions to collect data from
regions[#] str Required Region ID. Example: 'cn-north-1'
See full table in Appendix

2. Configuration Example

Collect instance data from the Beijing region

Python
1
2
3
collector_configs = {
    'regions': ['cn-north-1' ]
}

3. Data Reporting Format

After the data has been successfully synchronized, it can be viewed in the {{( brand_name )}} 'Infrastructure - Resource Catalog'.

An example of the reported data is as follows:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  "measurement": "aws_lambda",
  "tags": {
    "FunctionArn"       : "arn:aws-cn:",
    "FunctionName"      : "Test",
    "LastModified"      : "2023-05-23T08:51:19.458+0000",
    "PackageType"       : "Zip",
    "RegionId"          : "cn-northwest-1",
    "RevisionId"        : "2b7cc5f2",
    "Role"              : "arn:aws-cn:iam:",
    "Runtime"           : "python3.9",
    "Version"           : "$LATEST",
    "name"              : "Test"
  },
  "fields": {
    "CodeSha256"            : "aOIzyQyGf/xTKzs46zLnqw6UQCHtg=",
    "CodeSize"              : 292,
    "DeadLetterConfig"      : "{JSON data}",
    "Description"           : "xxxxx",
    "Environment"           : "{JSON data}",
    "Layers"                : "{JSON data}",
    "MemorySize"            : 128,
    "RuntimeVersionConfig"  : "{JSON data}",
    "Timeout"               : 3,
    "TracingConfig"         : "{\"Mode\": \"PassThrough\"}",
    "VpcConfig"             : "{JSON data}",
    "message"               : "{Instance JSON data}"
  }
}

The fields in tags and fields may change with subsequent updates

4. IAM Policy Permissions

If users use an IAM role to collect resources, certain operation permissions need to be enabled

This collector requires the following permissions:

lambda:ListFunctions

X. Appendix

Please refer to the AWS official documentation: