Hello,
having the need to store the cloudtrail logs in elasticsearch, I used the appropriate filebeat module providing it with all the options in this way:
- module: aws
  cloudtrail:
    enabled: true
    # AWS SQS queue url
    var.queue_url: ${AWS_SQS_QUEUE}
    # Process CloudTrail logs
    # default is true, set to false to skip Cloudtrail logs
    # var.process_cloudtrail_logs: false
    # Process CloudTrail Digest logs
    # default true, set to false to skip CloudTrail Digest logs
    # var.process_digest_logs: false
    # Process CloudTrail Insight logs
    # default true, set to false to skip CloudTrail Insight logs
    # var.process_insight_logs: false
    # Filename of AWS credential file
    # If not set "$HOME/.aws/credentials" is used on Linux/Mac
    # "%UserProfile%\.aws\credentials" is used on Windows
    #var.shared_credential_file: /etc/filebeat/aws_credentials
    # Profile name for aws credential
    # If not set the default profile is used
    #var.credential_profile_name: fb-aws
    # Use access_key_id, secret_access_key and/or session_token instead of shared credential file
    #var.access_key_id: ${AWS_ACCESS_KEY_ID}
    #var.secret_access_key: ${AWS_SECRET_ACCESS_KEY}
    #var.session_token: session_token
    # The duration that the received messages are hidden from ReceiveMessage request
    # Default to be 300s
    #var.visibility_timeout: 300s
    # Maximum duration before AWS API request will be interrupted
    # Default to be 120s
    #var.api_timeout: 120s
    # Custom endpoint used to access AWS APIs
    #var.endpoint: amazonaws.com
    # AWS IAM Role to assume
    #var.role_arn: arn:aws:iam::123456789012:role/test-mb
    # Enabling this option changes the service name from `s3` to `s3-fips` for connecting to the correct service endpoint.
    #var.fips_enabled: false
    # The maximum number of messages to return from SQS. Valid values: 1 to 10.
    #var.max_number_of_messages: 5
The SQS queue ${AWS_SQS_QUEUE} is in the following format:
https://sqs.eu-central-1.amazonaws.com/xxxxxxxx/queuename
However, at boot time the following error is returned:
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
2021-07-31T10:55:34.985+0200 INFO [input.s3] compat/compat.go:110 Input s3 starting
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.986+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
2021-07-31T10:55:34.985+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.986+0200 INFO [input.s3] compat/compat.go:110 Input s3 starting
2021-07-31T10:55:34.986+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
2021-07-31T10:55:34.986+0200 ERROR  [input.s3]  s3/input.go:93 getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME{"queue_url": "<no value>"}
2021-07-31T10:55:34.986+0200 ERROR  [input.s3]  compat/compat.go:121 Input 's3' failed with: getRegionFromQueueURL failed: queueURL is not in format: https://sqs.{REGION_ENDPOINT}.amazonaws.com/{ACCOUNT_NUMBER}/{QUEUE_NAME}
I searched the forum and found some posts with the same problem but without explaining if it is a bug or if you need to configure the beats in another way.
Can you help me?
thank you very much
Greetings