Skip to content

feat: adds folder for aws lambda layers#30

Closed
scefali wants to merge 3 commits into
getsentry:masterfrom
scefali:feat/lambda-layers
Closed

feat: adds folder for aws lambda layers#30
scefali wants to merge 3 commits into
getsentry:masterfrom
scefali:feat/lambda-layers

Conversation

@scefali

@scefali scefali commented Jan 8, 2021

Copy link
Copy Markdown
Contributor

This PR shows how we would add the AWS Lambda Layer information to the release registry. We will need this information in our docs (manual setup) as well as in Sentry (automated setup). AWS Lambda layers are installed by providing the ARN of the layer (which can be done manually or automatically with the AWS Lambda integration that is coming out). The layer ARN has the following components:

  1. Account number
  2. Region (user must pick the region they are in)
  3. Layer name
  4. Layer version

The layer version is an auto-incrementing number that would be updated each time we make a new release for that SDK. We should also keep track of what SDK version maps to what version of the layer in case someone needs to debug an older layer.

Note that I only include the 1.json and latest.json here to show what it would look like. Craft should be always generating these files during the release process.

@HazAT

HazAT commented Jan 11, 2021

Copy link
Copy Markdown
Member

@scefali I wonder if it would make sense just to add the new fields to the already existing entry in the registry and not create a new folder

With that we could make sure that the version we released to npm is the version on aws lambda

@scefali

scefali commented Jan 11, 2021

Copy link
Copy Markdown
Contributor Author

@HazAT Great question. My concern of just putting the new fields in the existing entry has to do with the fact that the Python layer we publish is runtime specific (see https://github.com/getsentry/sentry-python/pull/927/files). We have a different Layer for each version of Python. So a single Python release would have four new layer versions. I'm also conerned about adding a bunch of new fields to an NPM release that have nothing to do with NPM and I'm worried it might make it harder to figure out which versions of the Layer we've released (some releases might have the new fields but others won't) A separate folder just seems cleaner IMO. What's the hesitation of having it in a new folder? Would it help if I put it somewhere like the misc directory?

@HazAT

HazAT commented Jan 12, 2021

Copy link
Copy Markdown
Member

OK, I guess it makes sense. It's no problem having another folder I just thought it's a 1:1 relation to the SDK.

Comment thread aws-lambda-layers/node/1.json Outdated
"account_number": "943013980633",
"layer_name": "SentryNodeServerlessSDK",
"repo_url": "https://github.com/getsentry/sentry-javascript",
"main_docs_url": "https://docs.sentry.io/platforms/node/guides/aws-lambda"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we should add a list of regions

@@ -0,0 +1,14 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IIRC this file should be a symlink

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

3 participants