Skip to content

Conversation

@ozelalisen
Copy link
Member

see CHANGELOG

otaviomacedo and others added 2 commits November 24, 2025 16:02
…#36175)

The `ScheduleGroup.grant*()` methods are delegating to the methods in the auto-generated `ScheduleGroupGrants` class. This class is generating policies with an incorrect ARN. Instead of:

```
arn:aws:scheduler:<region>:xxx:schedule/my-group-name/*
```

it is generating:

```
arn:aws:scheduler:<region>:xxx:schedule-group/my-group-name/*
```

Since the code generation mechanism doesn't provide any way of specifying a custom logic for the ARN generation, replace the auto-generated `ScheduleGroupGrants` with hand-written one, in which the ARN is computed by:


```ts
private arnForScheduleInGroup(scheduleName: string): string {
  return Arn.format({
    region: this.resource.env.region,
    account: this.resource.env.account,
    partition: Aws.PARTITION,
    service: 'scheduler',
    resource: 'schedule',
    resourceName: this.resource.scheduleGroupRef.scheduleGroupName + '/' + scheduleName,
  });
}
```

Fixes #36165.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@ozelalisen ozelalisen added pr/no-squash This PR should be merged instead of squash-merging it pr-linter/analytics-metadata-change labels Nov 24, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 24, 2025 16:08
@github-actions github-actions bot added the p2 label Nov 24, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Nov 24, 2025
@ozelalisen ozelalisen closed this Nov 24, 2025
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2 pr/no-squash This PR should be merged instead of squash-merging it pr-linter/analytics-metadata-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants