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

Add ListLayerVersions permission for Sentry lambda layers #3834

Closed
connorads opened this issue Jul 25, 2021 · 16 comments
Closed

Add ListLayerVersions permission for Sentry lambda layers #3834

connorads opened this issue Jul 25, 2021 · 16 comments

Comments

@connorads
Copy link

Could you add lambda:ListLayerVersions for the Node (and Python) lambda layers

  • arn:aws:lambda:eu-west-1:943013980633:layer:SentryNodeServerlessSDK:26
  • arn:aws:lambda:eu-west-1:943013980633:layer:SentryPythonServerlessSDK:6

Currently you can't use serverless-latest-layer-version as per the AWS Lambda Serverless Framework Sentry docs

image

This is the error you get when trying to deploy using serverless-latest-layer-version

image

@connorads
Copy link
Author

Hey @ahmedetefy, any thoughts on this one?

@connorads
Copy link
Author

Hey @ahmedetefy, do you reckon we could change the lambda:ListLayerVersions permissions?

@connorads
Copy link
Author

Hey @ahmedetefy, do you reckon we could change the lambda:ListLayerVersions permissions?

@ahmedetefy
Copy link
Contributor

Hey @connorads , Sorry for the late reply
Let me check and get me back to you on that

@connorads
Copy link
Author

Hey @ahmedetefy I saw that you merged getsentry/sentry#28193 🎉 and so I gave it a go but still can't list layer versions 😢

image

@connorads
Copy link
Author

Hey @ahmedetefy I saw that you merged getsentry/sentry#28193 🎉 and so I gave it a go but still can't list layer versions 😢

@ahmedetefy
Copy link
Contributor

Hey @connorads , Yeah it seems like it needs further work to get it to work.. the team is looking into it

@connorads
Copy link
Author

Hey @ahmedetefy & @AbhiPrasad.

  1. Any idea on when list layer thing well get looked into?
  2. In the meantime, is there a website or a repo where we can find the latest version of the Node and Python Layer versions?

image

The only place I know where to look is the AWS Lambda/Serverless Framework docs
(and I updated that in getsentry/sentry-docs#3830 so it's deffo out of date)

image

@connorads
Copy link
Author

Just found that we appear to be able to get the latest lambda layer version from the docs here.
image
Which appears to be using some graphql API to fetch the latest layer version.

@AbhiPrasad
Copy link
Member

AbhiPrasad commented Feb 18, 2022

Any idea on when list layer thing well get looked into?

No timeline at the moment. @antonpirker perhaps you can help us out here?

In the meantime, is there a website or a repo where we can find the latest version of the Node and Python Layer versions?

We need to fix this in the docs. We should be syncing the docs with https://github.com/getsentry/sentry-release-registry, which tracks the most up to date version. We should be using the same logic we do in the Sentry frontend here. I'll go ahead and create a docs issue.

Just saw your later comment, we can update the code snippet to also use the ArnWrapper component!

Actually thought about it a little more, perhaps we can just link them to the guides page.

@smeubank
Copy link
Member

smeubank commented Mar 7, 2022

@antonpirker could it be that this doesn't require any change, or that it is a change in the way we set up our extension integrtion. If yes is there another repo to add this? Possibly this is just a doc issues, add to repo there and fix that we get the correct version

@connorads
Copy link
Author

connorads commented Mar 11, 2022

Hey @smeubank

I think it will require more than a documentation change if you want to allow what the original issue description and documentation mentions: get the latest lambda layer version programatically, using serverless framework, without specifying version number explicitly.

You can recreate the issue by cloning this repo and running npm run deploy: https://github.com/connorads/serverless-framework-latest-sentry-lambda-layer
image

I believe fixing it would require modifying your policies in AWS to allow lambda:ListLayerVersions for the Node (and Python) lambda layers.
And then updating the documentation to show users how to use it.

However if you don't want to support latest, which is a potentially reasonable position to take given that people usually fix their version numbers, then it's probably worth removing mention of latest from the documentation.

PS. If you'd like a call to discuss this please just drop me a message on http://connoradams.co.uk/

@HazAT
Copy link
Member

HazAT commented Jan 25, 2023

If you use the new layer it should work, please reopen if it's still a problem.

@HazAT HazAT closed this as completed Jan 25, 2023
@tcastelli
Copy link

hello @HazAT
I can confirm this is still a problem
image

@codebravotech
Copy link

Any updates on this? :)

@AbhiPrasad
Copy link
Member

@codebravotech mind creating new issue for this given this one has been stale for a while? Then we can assign someone to dig in deeper. Sorry for dropping the ball - thank you for the bump!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants