Fn::GetAtt Arn fails on a AWS::Scheduler::Schedule

0

I am unable to use Fn::GetAtt in a CloudFormation template to get the ARN of an AWS::Scheduler::Schedule. CloudFormation fails to update the stack with this error.

Unable to retrieve Arn attribute for AWS::Scheduler::Schedule, with error message Resource of type 'AWS::Scheduler::Schedule' with identifier 'lops-coder-DjangoBackendClearDjangoSessionsSchedul-VZ00I61PNLJ4' was not found.

According to the resource and policy reference for AWS::Scheduler::Schedule, Fn::GetAtt is defined for Arn.

In my CFT, I have an AWS::Scheduler::Schedule resource defined and successfully deployed.

Resources:
  ScheduleGroup:
    Type: AWS::Scheduler::ScheduleGroup  
  DjangoBackendClearDjangoSessionsSchedule:
    Type: AWS::Scheduler::Schedule
    Properties:
      GroupName: !Ref ScheduleGroup
      # …

If I add an output for the schedule's ARN, CloudFormation fails with the message above. This is the only change to the template.

Outputs:
  DjangoBackendClearDjangoSessionsScheduleArn:
    Value: !GetAtt DjangoBackendClearDjangoSessionsSchedule.Arn

I have confirmed that there is in fact a schedule named lops-coder-DjangoBackendClearDjangoSessionsSchedul-VZ00I61PNLJ4 in the same account and the same region.

Screenshot of the schedule in the AWS Console

  • It appears to me that this issue is limited to not using the default schedule group.

    I looked at the CloudTrail events. CloudFormation is not including GroupName in the GetSchedule API call. GroupName is required if the schedule is not in the default group.

1 Answer
0
Accepted Answer

I was able to reproduce it in my environment.
It may be a bug and you should contact AWS support.

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions