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

Feature/550 lambda eventsourcemapping #1040

Conversation

VedankPande
Copy link
Contributor

@VedankPande VedankPande commented Oct 4, 2023

Problem

Collector for Lambda collector not present

Solution

Add collector for AWS Lambda EventSourceMapping

Changes Made

  • Added function EventSourceMappings in providers/aws/lambda
  • Add function to return array in listOfSupportedServices in providers/aws/

How to Test

In your AWS account, create a lambda function that has an SQS queue set as a trigger. With Komiser properly
configured to your account, you should see a EventSourceMapping resource appear.

Screenshots

image

Notes

  • EventSourceMappings don't have names so the ID is used instead
  • similarly they don't have tags (afaik)
  • Do not incur any costs
  • link goes to the corresponding lambda function

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Reviewers

providers/aws/lambda/eventsourcemappings.go Outdated Show resolved Hide resolved
providers/aws/lambda/eventsourcemappings.go Outdated Show resolved Hide resolved
Provider: "AWS",
Account: client.Name,
Service: "EventSourceMapping",
ResourceId: *mapping.UUID,
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 we can keep the anr field here instead of UUID, we do that most of the places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Afaik, eventsourcemapping doesn't really have an arn, it has a UUID. That's because it's essentially an intermediary between the source (eg. SQS or Kinesis) and the lambda function. I can access the source ARN and lambda ARN though.

I've checked the above in the go sdk docs as well, if you find something different let me know and I'll make those changes.

@mlabouardy mlabouardy added this to the v3.1.1 milestone Oct 5, 2023
@mlabouardy mlabouardy merged commit 08992cc into tailwarden:develop Oct 5, 2023
2 checks passed
roblambell added a commit to roblambell/komiser that referenced this pull request Jan 8, 2024
list event source mappings has been needed since tailwarden#1040
Azanul pushed a commit that referenced this pull request Jan 9, 2024
* feat: add missing dynamodb action to policy.json

describe table has been needed since #1111

* feat: add missing lambda action to policy.json

list event source mappings has been needed since #1040

* feat: add missing iam action to policy.json

list users has been needed since #991

* fix: correct s3 permission for list buckets api call

listbucket iam action is for the contents of a bucket

* feat: add missing code suite actions to policy.json

needed since #1216, #1229, and #1228
Azanul pushed a commit that referenced this pull request Jan 9, 2024
* feat: add missing dynamodb action to policy.json

describe table has been needed since #1111

* feat: add missing lambda action to policy.json

list event source mappings has been needed since #1040

* feat: add missing iam action to policy.json

list users has been needed since #991

* fix: correct s3 permission for list buckets api call

listbucket iam action is for the contents of a bucket

* feat: add missing code suite actions to policy.json

needed since #1216, #1229, and #1228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants