Skip to content

Customizable Context is needed #502

@windymelt

Description

@windymelt

I wrote AWS Lambda handler using Feral IOLambda.Simple to handle IoT device (not Amazon IoT Button, but SORACOM's one) click event.

Since my IoT provider directly invokes lambda, lambda receives completely different Context from environment (for example it contains simId field). Thus runtime throws Cannot read properties of undefined (reading 'installationId') when decoding Context. When I invoke the lambda manually, the error does not occur.

Unfortunately, I cannot avoid this bahavior because decoding Context is completely untouchable.

image

In my use-case I don't need Context but input.

Would you mind to make Context type overridable and fully customizable?

Appendix

For example SORACOM's context is described here: https://users.soracom.io/ja-jp/docs/funk/format/#nodejs-%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E3%81%AE%E5%A0%B4%E5%90%88

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