feat(lambda-destinations): support Lambda async S3 destination#31709
feat(lambda-destinations): support Lambda async S3 destination#31709mergify[bot] merged 4 commits intoaws:mainfrom
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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.
| onSuccess: new destinations.S3Destination(successBucket), | ||
| maxEventAge: Duration.hours(4), | ||
| retryAttempts: 2, | ||
| }); |
There was a problem hiding this comment.
I haven't been able to run the tests successfully yet. Tomorrow, the service deployment will reach DUB, and I'll run the test there. Then I'll update the commit message and the integration test snapshot.
Please review the other changes until then.
There was a problem hiding this comment.
Updated the test snapshot in a new commit
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
| */ | ||
| public bind(_scope: Construct, fn: lambda.IFunction, _options?: lambda.DestinationOptions): lambda.DestinationConfig { | ||
| // grant read and putObject permissions | ||
| this.bucket.grantRead(fn); |
There was a problem hiding this comment.
I check other destinations and they only need Write permissions. Why do we need read permission here?
There was a problem hiding this comment.
There is a cross region check that needs to be done to block cross region bucket setup. Since an S3 arn doesn't have region in the arn format, we have to find the region using a headBucket call (as listed in the s3 documentation). This call needs listBucket permission. That's why read permission is needed.
For other destinations, the destination region is in the arn itself.
|
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). |
|
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). |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #31709 +/- ##
=======================================
Coverage 77.18% 77.18%
=======================================
Files 105 105
Lines 7161 7161
Branches 1312 1312
=======================================
Hits 5527 5527
Misses 1454 1454
Partials 180 180
Flags with carried forward coverage won't be shown. Click here to find out more.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
N/A
Reason for this change
Working on a new feature support - S3 destination for Lambda Async Invoke.
Description of changes
Description of how you validated changes
Unit tests and integration tests have been added.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license