Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Filebeat][aws-s3] Need to add support for new schema for Security Lake subscriber queue format #36630

Open
janvi-elastic opened this issue Sep 20, 2023 · 3 comments
Labels
enhancement Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team

Comments

@janvi-elastic
Copy link

janvi-elastic commented Sep 20, 2023

We want to collect data from SQS Queue which is automatically created when we add data subscriber in Amazon Security Lake. In that we are getting s3 path details instead of s3 object. Here is the example.

{
    "source": "aws.s3",
    "time": "2023-09-16T05:27:07Z",
    "account": "123456789012",
    "region": "us-west-2",
    "resources": ["resource_arn"],
    "detail":{
        "bucket": {
            "name": "aws-security-data-lake-us-west-2"
        },
        "object": {
            "key": "aws/ROUTE53/1.0/region=us-west-2/accountId=12345678/eventDay=20230916/test.gz.parquet",
            "size": 13176,
            "etag": "asdfghj567ghwjhhd"
        },
        "request-id": "request-id",
        "requester": "securitylake.amazonaws.com"
    }
}

While running filebeat we are facing below error.

{"log.level":"warn","@timestamp":"2023-09-20T10:46:40.686+0530","log.logger":"input.aws-s3.sqs","log.origin":{"file.name":"awss3/sqs.go","file.line":94},"message":"Failed processing SQS message.","service.name":"filebeat","id":"id","queue_url":"https://sqs.us-west-2.amazonaws.com/account_id/AmazonSecurityLake-Main-Queue","error":{"message":"failed processing SQS message (message was deleted): non-retryable error: the message is an invalid S3 notification: missing Records field"},"message_id":"1e49a07d-73c2-4d4f-9587-6b11daf245e6","elapsed_time_ns":720439234,"ecs.version":"1.6.0"}

Describe a specific use case for the enhancement or feature:

While creating Amazon Security Lake integration.

Related info: https://docs.aws.amazon.com/security-lake/latest/userguide/subscriber-data-access.html#sample-notification

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 20, 2023
@ShourieG ShourieG added Team:Security-External Integrations and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 22, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@andrewkroh
Copy link
Member

This can be handled by https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-aws-s3.html#_sqs_notification_parsing_script_source. The crowdstrike.fdr integration has a good example to follow.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Filebeat Filebeat Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

No branches or pull requests

5 participants