amazon web services - AWS Cloudformation to create EventBridge Scheduler to trigger Instance Refresh - Stack Overflow

admin2025-05-02  2

I getting following error during stack creation in cloudformation:

Resource handler returned message: "Invalid request provided: Invalid RequestJson provided. Reason The api StartInstanceRefresh is not valid for the service aws-sdk:autoscaling.

My Cloudformation code as follows:

ScheduleExecuteInstanceRefreshAPI:
    Type: AWS::Scheduler::Schedule
    Properties:
      Name: 
      ...
      Target:
        Arn: 'arn:aws:scheduler:::aws-sdk:autoscaling:StartInstanceRefresh'
      ...

From the aws official docs .html mentioned

Arn – The complete service ARN, including the API operation you want to target, in the following format: arn:aws:scheduler:::aws-sdk:service:apiAction.

Any idea on this?

I getting following error during stack creation in cloudformation:

Resource handler returned message: "Invalid request provided: Invalid RequestJson provided. Reason The api StartInstanceRefresh is not valid for the service aws-sdk:autoscaling.

My Cloudformation code as follows:

ScheduleExecuteInstanceRefreshAPI:
    Type: AWS::Scheduler::Schedule
    Properties:
      Name: 
      ...
      Target:
        Arn: 'arn:aws:scheduler:::aws-sdk:autoscaling:StartInstanceRefresh'
      ...

From the aws official docs https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html mentioned

Arn – The complete service ARN, including the API operation you want to target, in the following format: arn:aws:scheduler:::aws-sdk:service:apiAction.

Any idea on this?

Share Improve this question asked Jan 2 at 10:34 Yong CaiYong Cai 1471 silver badge17 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

All examples use camelCase instead of PascalCase for the API Action.

I suggest you try: 'arn:aws:scheduler:::aws-sdk:autoscaling:startInstanceRefresh' with a lower case s in the beginning.

转载请注明原文地址:http://anycun.com/QandA/1746124322a92011.html