-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add a construct to make/schedule AWS API calls #2538
Copy link
Copy link
Closed
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.
Description
The cdk could benefit from an AwsLambda or ScheduledAwsLambda construct that could be used like this:
new ScheduledAwsLambda(this, 'StopInstance', {
service: 'RDS',
action: 'stopDBInstance',
parameters: {
DBInstanceIdentifier: '...',
},
scheduleExpression: 'cron(0 1 * * ? *)'
});
new ScheduledAwsLambda(this, 'StartExecution', {
service: 'StepFunctions',
action: 'startExecution',
parameters: {
stateMachineArn: '...',
},
scheduleExpression: 'cron(0 1 * * ? *)',
});The lambda function takes the service, action and parameter as event and simply makes the call using aws-sdk-js.
See also discussion started in #1850
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.