Getting "could not be deployed. Enable it" while deploying Functionbeat as AWS Lambda with SQS trigger

797 Views Asked by At

I am trying to deploy Functionbeat to AWS Lambda from a Windows machine, I have followed the documentation I could find What I did:

1- Downloaded Functionbeat from https://www.elastic.co/downloads/beats/functionbeat (Windows zip-64)

2- Configure AWS CLI then test by running command

aws s3api create-bucket --bucket justtotest --create-bucket-configuration LocationConstraint=eu-central-1

3- Updated functionbeat.yml to

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- Run .\functionbeat.exe -v -e -d "*" deploy functionbeat

All I am getting in console logs:

2021-01-21T10:37:12.883+0300 INFO instance/beat.go:645 Home path: [C:\code\project\FuncionBeatLambda\functionbeat] Config path: [C:\code\project\FuncionBeatLambda\functionbeat] Data path: [/tmp] Logs path: [/tmp/logs]

2021-01-21T10:37:12.883+0300 DEBUG [beat] instance/beat.go:697
Beat metadata path: \tmp\meta.json

2021-01-21T10:37:12.885+0300 INFO instance/beat.go:653 Beat ID: 1ea27abc-aaaa-bbbb-cccc-fd5b90949abc

2021-01-21T10:37:12.890+0300 DEBUG [cli-handler]
cmd/cli_handler.go:52 Starting deploy for: functionbeat Function: functionbeat, could not be deployed. Enable it.

2021-01-21T10:37:12.890+0300 DEBUG [cli-handler]
cmd/cli_handler.go:62 Deploy execution ended Fail to deploy 1 function(s)

Which is not really helpful!

1

There are 1 best solutions below

3
On

After wasting 5 hours, I tried command .\functionbeat.exe -v -e -d "*" deploy sqs

Turns out the function name in command should match with one of the functionbeat.provider.aws.functions listed in functionbeat.yml