Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add details about aws lambda plugins #981

Merged
merged 4 commits into from
Apr 7, 2025

Conversation

deepjyoti30-st
Copy link
Contributor

@deepjyoti30-st deepjyoti30-st commented Apr 4, 2025

Summary of change

This PR adds details about using plugins with AWS lambda and how to filter and not pass them to SuperTokens.

Link to change

Related issues

Checklist

  • Algolia search needs to be updated? (If there is a new sub docs project, then yes)
  • Sitemap needs to be updated? (If there is a new sub docs project, then yes)
  • Checked for broken links? (Run cd v3 && npm run build)
  • Changes required to the demo apps corresponding to the docs?

Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 7:07am


## Using with AWS Lambda Plugins / Extensions

If you are using AWS Lambda plugins / extensions / anything that adds events to the lambda function (e:g `serverless-plugin-warmup`), then you may need to filter them and skip passing them to SuperTokens.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use commas between the enumeration: "plugins, extensions or anything..."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrase it so that the it doesn't seem like it's something optional: "you have to filter them before calling the SuperTokens handler.`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrase it so that the it doesn't seem like it's something optional: "you have to filter them before calling the SuperTokens handler.`

It is supposed to be optional as this can lead to errors in some cases, not all so I think it's better we keep this as optional.


If you are using AWS Lambda plugins / extensions / anything that adds events to the lambda function (e:g `serverless-plugin-warmup`), then you may need to filter them and skip passing them to SuperTokens.

These kind of events lack request details that SuperTokens expects, that are present in a normal request, and thus might lead to un-intended errors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the that are present... part. It's not necessary. just join the phrase on and thus.

@@ -348,3 +348,62 @@ handler = Mangum(app)

</BackendTabs.TabItem>
</BackendTabs>

## Using with AWS Lambda Plugins / Extensions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to have this as an optional step.
Something like:

3.5 Filter additional plugins or extensions {{optional}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right.

Copy link
Contributor Author

@deepjyoti30-st deepjyoti30-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving replies


#### 3.5 Filter additional plugins or extensions {{optional}}

If you are using AWS Lambda plugins, extensions, or anything that adds events to the lambda function (e.g. `serverless-plugin-warmup`), then you may need to filter them and skip passing them to SuperTokens.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"then you may need to prevent calling SuperTokens with them". Avoid repetition of them and remove redundant sentence.

@bcbogdan bcbogdan merged commit e2c84eb into master Apr 7, 2025
13 of 14 checks passed
@bcbogdan bcbogdan deleted the feat/add-details-about-aws-lambda-plugins branch April 7, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants