aws / aws/aws-durable-execution-sdk-java

[Feature]: parse SQSEvent and other trigger event types

Abierto
#366 4 comentarios 1 reacción 1 asignado Reclamado por @zhongkechen Ver en GitHub
enhancement
Lenguaje dominante
Java
Estrellas
28
Forks
11
Merge medio
1 d 8 h
PR fusionados (30 d)
47

Descripción

### Expected Behavior

When a durable function is subscribed to an SQS queue, then the incoming SQS event should directly convert to `SQSEvent` model of [AWS Lambda Java Events library](https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-events/README.md).

### Actual Behavior

Durable execution fails with the following error.
```
Cannot invoke \"java.util.List.iterator()\" because the return value of \"com.amazonaws.services.lambda.runtime.events.SQSEvent.getRecords()\" is null
```

### Steps to Reproduce

1. Set up SNS -> SQS -> Durable Lambda (Java)
2. Use `SQSEvent` model of [AWS Lambda Java Events library](https://github.com/aws/aws-lambda-java-libs/blob/main/aws-lambda-java-events/README.md).
```java
public SQSBatchResponse handleRequest(final SQSEvent event, final DurableContext ctx) {

}
```
3. Publish an SNS message.

### SDK Version

1.0.1

### Java Version

17

### Is this a regression?

No

### Last Working Version

_No response_

### Additional Context

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.