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

Bug: KafkaSelfManagedEventModel eventSource not correct #3324

Closed
leandrodamascena opened this issue Nov 16, 2024 · 2 comments · Fixed by #3325
Closed

Bug: KafkaSelfManagedEventModel eventSource not correct #3324

leandrodamascena opened this issue Nov 16, 2024 · 2 comments · Fixed by #3325
Assignees
Labels
bug Something isn't working completed This item is complete and has been merged/shipped parser This item relates to the Parser Utility

Comments

@leandrodamascena
Copy link
Contributor

Expected Behavior

Original issue: aws-powertools/powertools-lambda-python#5559

The schema KafkaSelfManagedEventSchema must have eventSource: z.literal('SelfManagedKafka'), instead of eventSource: z.literal('aws:SelfManagedKafka'),.

Reference: https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html

Current Behavior

Trying to validate with aws:SelfManagedKafka fails.

Code snippet

No code snippet

Steps to Reproduce

Use this event to validate

{
   "eventSource": "SelfManagedKafka",
   "bootstrapServers":"b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092",
   "records":{
      "mytopic-0":[
         {
            "topic":"mytopic",
            "partition":0,
            "offset":15,
            "timestamp":1545084650987,
            "timestampType":"CREATE_TIME",
            "key":"abcDEFghiJKLmnoPQRstuVWXyz1234==",
            "value":"SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==",
            "headers":[
               {
                  "headerKey":[
                     104,
                     101,
                     97,
                     100,
                     101,
                     114,
                     86,
                     97,
                     108,
                     117,
                     101
                  ]
               }
            ]
         }
      ]
   }
}

Possible Solution

No response

Powertools for AWS Lambda (TypeScript) version

latest

AWS Lambda function runtime

20.x

Packaging format used

npm, Lambda Layers

Execution logs

@leandrodamascena leandrodamascena added bug Something isn't working triage This item has not been triaged by a maintainer, please wait labels Nov 16, 2024
@am29d am29d added confirmed The scope is clear, ready for implementation and removed triage This item has not been triaged by a maintainer, please wait labels Nov 18, 2024
@am29d am29d self-assigned this Nov 18, 2024
@am29d am29d moved this from Triage to Working on it in Powertools for AWS Lambda (TypeScript) Nov 18, 2024
@am29d am29d added the parser This item relates to the Parser Utility label Nov 18, 2024
@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (TypeScript) Nov 18, 2024
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Nov 18, 2024
Copy link
Contributor

This is now released under v2.11.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Nov 20, 2024
@dreamorosi dreamorosi moved this from Coming soon to Shipped in Powertools for AWS Lambda (TypeScript) Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed This item is complete and has been merged/shipped parser This item relates to the Parser Utility
Projects
Development

Successfully merging a pull request may close this issue.

2 participants