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.
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.