10000 Feature request: Calculate AppSync Event publish size before returning a response · Issue #4020 · aws-powertools/powertools-lambda-typescript · GitHub
[go: up one dir, main page]

Skip to content
Feature request: Calculate AppSync Event publish size before returning a response #4020
Open
@Jimmy89

Description

@Jimmy89

Use case

Currently, I have had multiple times that my messages were not received by clients. Upon investigation, I could not find any errors within my code. Eventually, I managed to find out that AppSync Events is rejecting some message because the total message size is bigger than 240Kb, by sending my lambda response directly within the AppSync Event console.

I use the EventSync Events handler. As the total size of the message is depending on a number of factors (for example JSON.stringify increased my integer array with a size * 2), it would be great to somehow detect a bigger than 240Kb message before returning the lambda handler. That way, I can remove nice-to-have properties or split up the messages into multiple parts.

Solution/User Experience

One idea would be to have a function calculateMessageSize returning the total message size in Kb, so you can delete properties.

Alternative solutions

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    event-handlerThis item relates to the Event Handler Utilityfeature-requestThis item refers to a feature request for an existing or new utilityneed-more-informationRequires more information before making any calls

    Type

    No type

    Projects

    Status

    Ideas

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0