getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.52k stars 4.12k forks source link

AWS Lambda Problem #24821

Open vishwasnavadak opened 3 years ago

vishwasnavadak commented 3 years ago

Important Details

How are you running Sentry?

On-Premise w/ Docker, version 21.3.0 96d5172

Description

Clicking on Go to AWS button on AWS Integration page goes to TemplateURL missing error.

image image

Steps to Reproduce

  1. Go to Settings

  2. Navigate to Integration from left sidebar.

  3. Click on Add Integration for AWS Lambda

  4. Pop Up appears with image

  5. Click on Go To AWS

  6. Login with AWS credentials

  7. CloudFormation Page appears with the error since the templateURL in the URL is blank.

Good items to include here include:

What you expected to happen

templateURL is supposed to be populated with link to the CloudFormation template file. But it is indeed blank. stackName=Sentry-Monitoring-Stack&templateURL=

BYK commented 3 years ago

Pinging @getsentry/ecosystem for triage

BYK commented 3 years ago

Ping @getsentry/growth for triage :)

scefali commented 3 years ago

We currently don't support AWS Lambda on self-hosted (we need docs to explain how to set it up). This is in our backlog but I'm not sure when we'll get to it.

vishwasnavadak commented 3 years ago

Thanks for letting me know!

I was hoping this could have been mentioned somewhere before I struggled to set it up.

graeme44 commented 2 years ago

@scefali Think this is something we can contribute to? Happy to make PR if you point me in the right direction.

shimon-elbaz commented 2 years ago

interested in this procedure as well

senbax-admin commented 2 years ago

Does anyone know how to set this up?

miguelconde91 commented 1 year ago

Any update about this issue? I have the same problem trying to integrate Sentry Self-Hosted with AWS Lambda Functions.

ivdmeer commented 1 year ago

I'm having the same issue as described above with a self-hosted sentry environment. Unable to add the installation with a cloud formation template from sentry. Is there any update of work-around for this issue?

Is it possible to share the url where this template is hosted?? While googling this issue I found an example where the template url is shared, but this is one is not active any more.. this url was: https://s3.us-east-1.amazonaws.com/sentry-performance-monitoring/cloudformation-template.yaml

ivdmeer commented 1 year ago

I just created a test account on sentry.io on the cloud edition of sentry and when I start this aws integration I now get the templateUrl parameter with a value: templateURL=https%3A%2F%2Fsentry-cloudformation-templates.s3.us-east-2.amazonaws.com%2Flambda-cloudformation.json

The cloudformation template deploys correct, but I cannot connect with the self-hosted sentry to my aws account, I get the following error:

Screenshot from 2023-05-25 15-12-49

When I use the same settings on the cloud edition of sentry, connecting to my aws account does work.

So could this issue please get some more attention?

fullyherge commented 1 year ago

@ivdmeer it's tagged as backlog. Dev replied earlier in thread: https://github.com/getsentry/sentry/issues/24821#issuecomment-816112452

getsantry[bot] commented 12 months ago

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

dhavaljbroadlume commented 1 month ago

https://sentry-cloudformation-templates.s3.us-east-2.amazonaws.com/lambda-cloudformation.json This url works for me. just add it at the end of url.

scefali commented 1 month ago

@dhavaljbroadlume That JSON file will give permissions to the Sentry role in the Sentry AWS account, it won't work for other people

dhavaljbroadlume commented 1 month ago

So, there's a catch with that sentry stack, basically you just need a SentryRole(will be created using the above template). but, as @scefali suggested, that was the exact thing with my issue, it was giving access in sentry aws account. Following setup is working for me just fine with any region!

  1. Go to role settings.
  2. Edit trust policy in trust relationships tab.
  3. Modify like below -> arn:aws:iam:::user/sentry-user
  4. Keep in mind that i have created a sentry-user and i am using AWS_ACCESS_KEY_ID and SECRET_ACCESS_KEY in my config.yml file
  5. The role should point to the credentials using which sentry was initialized(the user).

Add below things in config.yml and reinstall sentry( docker compose down && ./install.sh && docker compose up -d) config.yml

# AWS Lambda Integration
aws-lambda.access-key-id: "YOUR_ACCESS_KEY_ID"
aws-lambda.secret-access-key: "YOUR_SECRET_ACCESS_KEY"
aws-lambda.node.layer-name: "SentryNodeServerlessSDK" // Lambda Layer will be created with this name.
aws-lambda.node.layer-version: "264" // Default version
# the region of the host account we use for assuming the role
aws-lambda.host-region: "us-east-2" // Default region, optional i guess
# aws-lamda.cloudformation-url: "https://sentry-cloudformation-templates.s3.us-east-2.amazonaws.com/lambda-cloudformation.json" // Just keeping this here for doc.