Skip to content

The ScheduleEvent Input property now supports file paths #2341

Merged
GarrettBeatty merged 2 commits intodevfrom
gcbeatty/jsoninput
Apr 22, 2026
Merged

The ScheduleEvent Input property now supports file paths #2341
GarrettBeatty merged 2 commits intodevfrom
gcbeatty/jsoninput

Conversation

@GarrettBeatty
Copy link
Copy Markdown
Collaborator

@GarrettBeatty GarrettBeatty commented Apr 22, 2026

The ScheduleEvent Input property now supports file paths (relative to… the project root or absolute) in addition to literal JSON strings. If the value resolves to an existing file, its contents are read and used as the input in the CloudFormation template.

Issue #, if available:

#2323 (comment)

Testing

manually tested by creating a program that looks like

[LambdaFunction(ResourceName = "ScheduledHandler", Policies = "AWSLambdaBasicExecutionRole", PackageType = LambdaPackageType.Image)]
[ScheduleEvent("rate(5 minutes)", ResourceName = "FiveMinuteSchedule", Description = "Runs every 5 minutes", Input = "schedule-input.json")]
public void HandleSchedule(ScheduledEvent evnt, ILambdaContext lambdaContext)
{
    lambdaContext.Logger.Log($"Scheduled event received at {evnt.Time}");
}
}

with json file like

{"action": "scheduled-processing", "source": "five-minute-rule"}

validated resulting template looks like

},
        "Events": {
          "FiveMinuteSchedule": {
            "Type": "Schedule",
            "Properties": {
              "Schedule": "rate(5 minutes)",
              "Description": "Runs every 5 minutes",
              "Input": "{\"action\": \"scheduled-processing\", \"source\": \"five-minute-rule\"}"
            }
          }
        }

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@GarrettBeatty GarrettBeatty changed the title The ScheduleEvent Input property now supports file paths (relative to… The ScheduleEvent Input property now supports file paths Apr 22, 2026
Base automatically changed from feature/schedule-annotations to dev April 22, 2026 13:07
… the project root or absolute) in addition to literal JSON strings. If the value resolves to an existing file, its contents are read and used as the input in the CloudFormation template.
@GarrettBeatty GarrettBeatty marked this pull request as ready for review April 22, 2026 14:38
@GarrettBeatty GarrettBeatty requested a review from a team as a code owner April 22, 2026 14:38
@GarrettBeatty GarrettBeatty merged commit 7822949 into dev Apr 22, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants