Skip to content

feat(lambda-event-sources): Add eventsourceMappingArn to IEventSourceMapping #24991

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

Merged
merged 2 commits into from
Apr 24, 2023
Merged

feat(lambda-event-sources): Add eventsourceMappingArn to IEventSourceMapping #24991

merged 2 commits into from
Apr 24, 2023

Conversation

WtfJoke
Copy link
Contributor

@WtfJoke WtfJoke commented Apr 7, 2023

Currently the eventsourceMappingArn (for example for SQS Lambda Trigger) needs to be constructed manually:
arn:aws:lambda:eu-west-1:ACCOUNT_ID:event-source-mapping:EVENTSOURCEMAPPINGID

With this change its no longer needed to construct it manually.
The solution now exposes the eventSourceMappingArn on the IEventSourceMapping. The ARN is constructed by the individual components (service, resource, resourceName/eventSourceMappingId and format).

I considered adding a static method fromEventSourceMappingArn to the EventSourceMapping class. Wasnt sure if it provides any value, but let me know if you think its a good Idea to add it.

Sidenote:
I had a bit of a struggle to build the project (during development I had a lot of heap memory issues).
Additionally I wasnt able to execute the integration tests, I tried to follow https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md#running-integration-tests but either I make something wrong or the guide seems out of date? Would be great if I get some pointers in the right direction.

Closes #24801 .


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team April 7, 2023 16:57
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Apr 7, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@WtfJoke WtfJoke changed the title feat(aws-lambda-event-sources) Add eventsourceMappingArn to IEventSourceMapping feat(aws-lambda-event-sources): Add eventsourceMappingArn to IEventSourceMapping Apr 7, 2023
@WtfJoke WtfJoke changed the title feat(aws-lambda-event-sources): Add eventsourceMappingArn to IEventSourceMapping feat(lambda-event-sources): Add eventsourceMappingArn to IEventSourceMapping Apr 7, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review April 7, 2023 18:12

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

3 similar comments
@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@gitpod-io
Copy link

gitpod-io bot commented Apr 21, 2023

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 21, 2023

@pahud Can you or somebody else please have a look? I've rebased the branch.

Sidenote: I had quite a struggle, rebasing the changes, since there are a lot of changes going through this repo in 2 weeks 🙈
I would love to get this merged soon, appreciate feedback :)

Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the PR!

@mergify
Copy link
Contributor

mergify bot commented Apr 24, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3cdee9c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit ecd7374 into aws:main Apr 24, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 24, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@WtfJoke
Copy link
Contributor Author

WtfJoke commented Apr 24, 2023

Thank you for taking a look @corymhall :) 🙏

@WtfJoke WtfJoke deleted the addEventSourceMappingArn24801 branch April 24, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-lambda-event-sources): Add eventsourceMappingArn property to IEventSource
3 participants