-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-stepfunctions-tasks: CallAwsService for elasticloadbalancingv2 produces invalid IAM role policies #32417
Comments
Thanks for the very clear bug report, I've opened a PR to address this issue 👍 |
Thank you @tomykaira and @nmussy for your immediate PR support!! |
Just checked the IAM console. When selecting ELBv2 describeTargetGroups I actually get this policy. {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "elasticloadbalancing:DescribeTargetGroups",
"Resource": "*"
}
]
} |
Yeah that's the expected result, and what my PR generates: https://github.com/aws/aws-cdk/pull/32419/files#diff-c366bafc63a0d3f2bf3e8ec4c85c8b48bffce5352ce7cd5d77f460d34372160bR404-R406 The statement prior to the change is EDIT: Unless you're talking about the difference in casing, which shouldn't matter (docs):
|
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
sfn.StateMachine with tasks.CallAwsService helps to setup an IAM role by scanning the task definition.
When the task definition contains
CallAwsService
withservice: 'elasticloadbalancingv2'
,the state machine's IAM role has a policy like this:
However,
elasticloadbalancingv2
is invalid in IAM actions. It should beelasticloadbalancing
.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
It produces IAM role policy like this:
Current Behavior
It produces IAM role policy like this:
Reproduction Steps
Include this state machine declaration in a stack.
Possible Solution
Add some conversion here: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/aws-sdk/call-aws-service.ts#L116
Additional Information/Context
No response
CDK CLI Version
2.172.0 (build 0f666c5)
Framework Version
No response
Node.js Version
v20.12.2
OS
Fedora release 38 (Thirty Eight)
Language
TypeScript
Language Version
5.6.3
Other information
No response
The text was updated successfully, but these errors were encountered: