我正在尝试从 Windows 机器将 Functionbeat 部署到 AWS Lambda,我遵循了我可以找到的文档我做了什么:
1- 从https://www.elastic.co/downloads/beats/functionbeat (Windows zip-64)下载 Functionbeat
2- 配置 AWS CLI 然后通过运行命令进行测试
aws s3api create-bucket --bucket justtotest --create-bucket-configuration LocationConstraint=eu-central-1
3- 将 functionbeat.yml 更新为
functionbeat.provider.aws.endpoint: "s3.amazonaws.com"
functionbeat.provider.aws.deploy_bucket: "mybucketname"
functionbeat.provider.aws.functions:
# Create a function that accepts events from SQS queues.
- name: sqs
enabled: true
type: sqs
# Description of the method to help identify them when you run multiples functions.
description: "lambda function for SQS events"
# List of SQS queues.
triggers:
# Arn for the SQS queue.
- event_source_arn: arn:aws:sqs:eu-central-1:****:queuename
cloud.id: "mycloudid"
cloud.auth: "elastic:mainAccountPass"
4-运行.\functionbeat.exe -v -e -d "*" deploy functionbeat
我在控制台日志中得到的所有信息:
2021-01-21T10:37:12.883+0300 INFO instance/beat.go:645 主路径:[C:\code\project\FuncionBeatLambda\functionbeat] 配置路径:[C:\code\project\FuncionBeatLambda\functionbeat] 数据路径:[/tmp] 日志路径:[/tmp/logs]
2021-01-21T10:37:12.883+0300 DEBUG [beat] instance/beat.go:697
Beat 元数据路径:\tmp\meta.json2021-01-21T10:37:12.885+0300 INFO 实例/beat.go:653 节拍 ID:1ea27abc-aaaa-bbbb-cccc-fd5b90949abc
2021-01-21T10:37:12.890+0300 调试 [cli-handler]
cmd/cli_handler.go:52 开始部署:functionbeat 功能:functionbeat,无法部署。启用它。2021-01-21T10:37:12.890+0300 DEBUG [cli-handler]
cmd/cli_handler.go:62 部署执行结束 未能部署 1 个函数
这不是真的有帮助!