Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scheduler-alpha): scheduler input always get transformed to string with extra double quotes #31894

Merged
merged 23 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff1e462
reduce key permissions. pending test changes
samson-keung Oct 24, 2024
9025add
update integ test to have less KMS permissions
samson-keung Oct 24, 2024
fb485c7
revise schedule integ test to have assertion
samson-keung Oct 24, 2024
d6d4a7d
Integ assertion is updated to poll for max 10 messages from SQS
samson-keung Oct 24, 2024
6f0f045
Add missing permission to Schedule to send messages to queue
samson-keung Oct 24, 2024
88dad4f
make assertion wait time less. 5 minutes
samson-keung Oct 24, 2024
1447087
update schedule time so that they do not get invoked
samson-keung Oct 24, 2024
5b81a3e
fix input fromText has extra quotations
samson-keung Oct 25, 2024
37091ff
update snapshot
samson-keung Oct 25, 2024
cc45044
update integ test
samson-keung Oct 25, 2024
4e980a2
update SNS target integ test
samson-keung Oct 25, 2024
3001fb0
update test with input logic update
samson-keung Oct 25, 2024
c8ef60d
update sqs target integ test
samson-keung Oct 25, 2024
6d0c9c3
update LambdaInvoke integ test
samson-keung Oct 25, 2024
9fc50c5
revert reducing key permissions
samson-keung Oct 25, 2024
d8992ee
revert integ.schedule.ts change
samson-keung Oct 25, 2024
3f3e132
fix integ.schedule test
samson-keung Oct 25, 2024
fabef86
fix integ.schedule test
samson-keung Oct 25, 2024
7c67ac0
fix integ.schedule test
samson-keung Oct 25, 2024
455a092
update integ
samson-keung Oct 26, 2024
550cc14
add unit test for input
samson-keung Oct 26, 2024
404f0aa
Merge branch 'main' into scheduler-reduce-key-permissions
samson-keung Oct 28, 2024
09521ad
Merge branch 'main' into scheduler-reduce-key-permissions
mergify[bot] Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-scheduler-alpha/lib/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class Schedule extends Resource implements ISchedule {

this.key = props.key;
if (this.key) {
this.key.grantEncryptDecrypt(targetConfig.role);
this.key.grantDecrypt(targetConfig.role);
}

this.retryPolicy = targetConfig.retryPolicy;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@
"PolicyDocument": {
"Statement": [
{
"Action": [
"kms:Decrypt",
"kms:Encrypt",
"kms:GenerateDataKey*",
"kms:ReEncrypt*"
],
"Action": "kms:Decrypt",
"Effect": "Allow",
"Resource": {
"Fn::GetAtt": [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions packages/@aws-cdk/aws-scheduler-alpha/test/schedule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Template } from 'aws-cdk-lib/assertions';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { IScheduleTarget, Schedule, ScheduleTargetConfig, TimeWindow } from '../lib';
import { ScheduleExpression } from '../lib/schedule-expression';
import { IScheduleTarget, Schedule, ScheduleTargetConfig, TimeWindow, ScheduleExpression } from '../lib';

class SomeLambdaTarget implements IScheduleTarget {
public constructor(private readonly fn: lambda.IFunction, private readonly role: iam.IRole) {
Expand Down Expand Up @@ -119,7 +118,7 @@ describe('Schedule', () => {
PolicyDocument: {
Statement: [
{
Action: ['kms:Decrypt', 'kms:Encrypt', 'kms:ReEncrypt*', 'kms:GenerateDataKey*'],
Action: 'kms:Decrypt',
Effect: 'Allow',
Resource: { 'Fn::GetAtt': ['Key961B73FD', 'Arn'] },
},
Expand Down
Loading