feat(event-targets): add role property to sqs event target#33701
feat(event-targets): add role property to sqs event target#33701
Conversation
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33701 +/- ##
=======================================
Coverage 82.24% 82.24%
=======================================
Files 119 119
Lines 6875 6875
Branches 1161 1161
=======================================
Hits 5654 5654
Misses 1118 1118
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
|
Clarification Request: Hi! I'm receiving the message that my PR will be closed soon due to the test failure, but tests are also failing on the main branch. |
| * | ||
| * @default - no role defined | ||
| */ | ||
| readonly role?: iam.Role; |
There was a problem hiding this comment.
question for my understanding :
why is this only in SQS queue props, since this is something that is related to EventTargets, isn't it relevant to each type of target that is supported, so should be part of TargetBaseProps.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-target.html#cfn-events-rule-target-rolearn
There was a problem hiding this comment.
@shikha372, I moved the prop to TargetBaseProps and aligned other related interfaces. Tests ran successfully on my machine. Please take a look at this PR once again.
There was a problem hiding this comment.
Thank you @atnartur , error you're facing is due to readme related changes
[jsii-rosetta] [INFO] Adding translations to /root/.s3buildcache/rosetta-cache.tabl.json
aws-cdk-lib.aws_events_targets-README-L639.ts:23:12 - error TS2304: Cannot find name 'RuleTargetInput'.
23 message: RuleTargetInput.fromObject({
~~~~~~~~~~~~~~~
[jsii-rosetta] [WARN] 1 diagnostics from assemblies with 'strict' mode on (and 64 more non-strict diagnostics)
real 10m11.458s
user 127m5.050s
sys 9m1.260s
you can try updating readme with events.RuleTargetInput.fromObject
There was a problem hiding this comment.
@shikha372 Someone added the same example already in main branch, so I removed my part. I think this check should pass. Please take a look on the PR once again
75d4b53 to
9dcc5f4
Compare
| // When scoping resource-level access for job submission, you must provide both job queue and job definition resource types. | ||
| // https://docs.aws.amazon.com/batch/latest/userguide/ExamplePolicies_BATCH.html#iam-example-restrict-job-def | ||
| const role = singletonEventRole(this.jobDefinitionScope); | ||
| const role = this.props.eventRole ?? singletonEventRole(this.jobDefinitionScope); |
There was a problem hiding this comment.
currious why we need this change ?
There was a problem hiding this comment.
The role created here extends with an additional policy statement in the lines below, so I repeat the behaviour from bindBaseTargetConfig here to save the same process of role initiation.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Hi @shikha372! Could you please take a look at this PR? |
|
Hi, This PR has conflicts that need to be resolved before it can be reviewed. |
|
Hi @pahud, |
Reason for this change
Add role property to SQS Event Target in EventBridge
Description of changes
Add role attribute to SQS Event Target in EventBridge which is available in AWS CloudFormation template but was not available in AWS CDK.
Describe any new or updated permissions being added
No changes in permissions are made.
Description of how you validated changes
Deploy an EventBridge Rule with SQS Event Target and custom role.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license