typelevel / typelevel/feral

Customizable Context is needed

Open
#502 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
195
Forks
53
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Feral IOLambda.Simple entry point and trace how the Lambda Context is decoded, comparing the provider's SORACOM context with the manually invoked context described in the issue. Done means callers can override or fully customize Context decoding so handlers that only need input work with SORACOM's invocation format.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, scala
Domain
backend, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.