-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Closed
Copy link
Labels
@aws-cdk/aws-iamRelated to AWS Identity and Access ManagementRelated to AWS Identity and Access ManagementbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp3
Description
Describe the bug
I am working on writing a CDK based step function with a task to call 'tagresources' on an EFS access point:
const tagAccessPoint = new CallAwsService(this, 'TagAccessPoint', {
stateName: 'Tag access point',
service: 'efs',
action: 'tagResource',
iamResources: ['*'],
parameters: {
ResourceId: JsonPath.stringAt('$.pathToArn'),
Tags: [
{
Key: "MYTAGNAME",
Value: JsonPath.stringAt('$.pathToId')
}
]
},
resultPath: JsonPath.DISCARD
})Produces an incorrect a IAM policy snippet.
Expected Behavior
It should be (ref):
{
"Action": "elasticfilesystem:tagResource",
"Resource": "*",
"Effect": "Allow"
}Current Behavior
Produces:
{
"Action": "efs:tagResource",
"Resource": "*",
"Effect": "Allow"
}Which is incorrect, it should be (ref):
Reproduction Steps
Create the following task as part of a CDK defined state machine:
const tagAccessPoint = new CallAwsService(this, 'TagAccessPoint', {
stateName: 'Tag access point',
service: 'efs',
action: 'tagResource',
iamResources: ['*'],
parameters: {
ResourceId: JsonPath.stringAt('$.pathToArn'),
Tags: [
{
Key: "MYTAGNAME",
Value: JsonPath.stringAt('$.pathToId')
}
]
},
resultPath: JsonPath.DISCARD
})Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.147.2
Framework Version
No response
Node.js Version
20
OS
macOS
Language
TypeScript
Language Version
TypeScript (5.4.2)
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-iamRelated to AWS Identity and Access ManagementRelated to AWS Identity and Access ManagementbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp3