amazon-web-servicesaws-cliaws-event-bridge

How to retrieve details of a specific schedule using AWS CLI?


I list the Names of my Amazon EventBridge schedules using list-schedules:

aws scheduler list-schedules | jq '.Schedules[].Name'

It outputs: my-schedule. To double check, I view the name of my schedule on AWS webpage:

enter image description here

Yet when I try to use get-schedule:

aws scheduler get-schedule --name my-schedule

I get the error:

An error occurred (ResourceNotFoundException) when calling the GetSchedule operation: Schedule my-schedule does not exist.

How can I retrieve details about a specific schedule using AWS CLI?


Solution

  • If --group-name isn't used, default will be used as the group name. Ensure the correct schedule group name is used. For example:

    aws scheduler get-schedule --group-name name-of-schedule-group \
                               --name name-of-schedule