scenarios/features/eventbridge_scheduler/SPECIFICATION.md
This document contains the technical specifications for Amazon Eventbridge Scheduler Scenario, a feature scenario that showcases AWS services and SDKs. It is primarily intended for the AWS code examples team to use while developing this example in additional languages.
This document explains the following:
For an introduction, see the README.md.
RoleARN and SNStopicARN, which will be used for the EventBridge Scheduler operations.Example:
--------------------------------------------------------------------------------
Welcome to the Amazon EventBridge Scheduler Scenario.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Preparing the application...
This example creates resources in a CloudFormation stack, including an SNS topic
that will be subscribed to the EventBridge Scheduler events.
You will need to confirm the subscription in order to receive event emails.
Enter an email address to use for event subscriptions:
[email protected]
Enter a name for the AWS Cloud Formation Stack:
teststack10
Deploying CloudFormation stack: teststack10
Enter a name for the AWS Cloud Formation Stack:
warn: SchedulerScenario.SchedulerWorkflow[0]
CloudFormation stack 'teststack10' already exists. Please provide a unique name.
stackAB
Deploying CloudFormation stack: stackAB
CloudFormation stack creation started: stackAB
Waiting for CloudFormation stack creation to complete...
CloudFormation stack creation complete.
Stack output RoleARN: arn:aws:iam::123456789123:role/example_scheduler_role
Stack output SNStopicARN: arn:aws:sns:us-east-1:123456789123:stackAB-SchedulerSnsTopic-UORtMkZypo3x
--------------------------------------------------------------------------------
Example:
Successfully created schedule group 'scenario-schedules-group'.
Application preparation complete.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Enter a name for the one-time schedule:
one-time-test
Creating a one-time schedule named 'one-time-test' to send an initial event in 1 minute...
Successfully created schedule 'one-time-test' in schedule group 'scenario-schedules-group'.
Subscription email will receive an email from this event.
You must confirm your subscription to receive event emails.
One-time schedule 'one-time-test' created successfully.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Creating a recurring schedule to send events for one hour...
Enter a name for the recurring schedule:
recurring-test
Enter the desired schedule rate (in minutes):
2
Successfully created schedule 'recurring-test' in schedule group 'scenario-schedules-group'.
Subscription email will receive an email from this event.
You must confirm your subscription to receive event emails.
Are you ready to delete the 'recurring-test' schedule? (y/n)
y
Example
Example:
Are you ready to delete the 'recurring-test' schedule? (y/n)
y
Successfully deleted schedule with name 'recurring-test'.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Do you want to delete all resources created by this workflow? (y/n)
y
Successfully deleted schedule group 'scenario-schedules-group'.
CloudFormation stack 'teststack10' is being deleted. This may take a few minutes.
Waiting for CloudFormation stack 'teststack10' to be deleted...
Waiting for CloudFormation stack 'teststack10' to be deleted...
CloudFormation stack 'teststack10' has been deleted.
--------------------------------------------------------------------------------
Amazon EventBridge Scheduler workflow completed.
| action | Error | Handling |
|---|---|---|
ListSchedules | none | Not required for Hello Service |
CreateSchedule | ConflictException | Notify the user to use a unique name. |
CreateScheduleGroup | ConflictException | Notify the user to use a unique name. |
DeleteSchedule | ResourceNotFoundException | Notify the user the schedule is already deleted. |
DeleteScheduleGroup | ResourceNotFoundException | Notify the user the group is already deleted. |
| action / scenario | metadata file | metadata key |
|---|---|---|
ListSchedules | scheduler_metadata.yaml | scheduler_hello |
CreateSchedule | scheduler_metadata.yaml | scheduler_CreateSchedule |
CreateScheduleGroup | scheduler_metadata.yaml | scheduler_CreateScheduleGroup |
DeleteSchedule | scheduler_metadata.yaml | scheduler_DeleteSchedule |
DeleteScheduleGroup | scheduler_metadata.yaml | scheduler_DeleteScheduleGroup |
EventBridge Scheduler Scenario | scheduler_metadata.yaml | scheduler_ScheduledEventsScenario |