Skip to content

Commit

Permalink
fix(parser): remove 'aws:' prefix from SelfManagedKafka model (#5584)
Browse files Browse the repository at this point in the history
remove the aws: from the SelfManagedKafka

Co-authored-by: Ana Falcao <afalcao@bcd0744af793.ant.amazon.com>
  • Loading branch information
anafalcao and Ana Falcao authored Nov 19, 2024
1 parent 5f64029 commit 150623b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion aws_lambda_powertools/utilities/parser/models/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class KafkaSelfManagedEventModel(KafkaBaseEventModel):
- https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html
"""

eventSource: Literal["aws:SelfManagedKafka"]
eventSource: Literal["SelfManagedKafka"]


class KafkaMskEventModel(KafkaBaseEventModel):
Expand Down
66 changes: 33 additions & 33 deletions tests/events/kafkaEventSelfManaged.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"eventSource":"aws: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":"cmVjb3JkS2V5",
"value":"eyJrZXkiOiJ2YWx1ZSJ9",
"headers":[
{
"headerKey":[
104,
101,
97,
100,
101,
114,
86,
97,
108,
117,
101
]
}
]
}
]
}
}
"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": "cmVjb3JkS2V5",
"value": "eyJrZXkiOiJ2YWx1ZSJ9",
"headers": [
{
"headerKey": [
104,
101,
97,
100,
101,
114,
86,
97,
108,
117,
101
]
}
]
}
]
}
}

0 comments on commit 150623b

Please sign in to comment.