Skip to content

Adding new event for SQS API requests #710

@rgreinho

Description

@rgreinho

I am trying to use a new Rust Lambda in one of my step functions.

The flow is very simple, with 3 steps (the Rust Lambda is the second step):

ReceiveSQSMessage ->  ProcessMessagePayload -> DeleteSQS Message

However it looks like I cannot deserialize the message with

async fn function_handler(event: LambdaEvent<SqsMessageObj<AnalysisParameters>>) -> Result<(), Error>

because there is no records field.

SqsMessageObj seems to be matching the structure described here: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#example-standard-queue-message-event, but when using the step function task, the structure is different: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html#API_ReceiveMessage_ResponseSyntax.

So if my understanding is correct, we would need to add 2 new structs: SqsAPIEventObj and SqsAPIMessageObj, matching the format described in the second link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions