Skip to content

EventBridge Scheduler create_schedule missing a way to add Target Input parameter with "Universal target definition" #4458

@lorenzo-necto

Description

@lorenzo-necto

Describe the bug

Hi

We are using boto3 create_schedule to create a schedule that has an SNS as target and setting role arn, target arn and input in the boto3 function. The input is Published to SNS with the Publish API called by the scheduler. I am trying to set a universal SNS parameter in the input parameter programmatically in boto that is needed if i want the SNS notification to use APNS for mobile push notifications. In particular i am trying to do what one is able to do on the AWS GUI and switch from Message payload for Publish SNS API action to "universal target definition" and add a complete payload with SNS keys not just the message.

I need to use "MessageStructure": "json" in the universal target definition basically.

The complete payload would be for me
{
"MessageStructure": "json",
"Message": "{"default":"Call Friend Reminder","APNS_SANDBOX":"{\"aps\":{\"alert\":{\"title\":\"Event Reminder\",\"subtitle\":\"Upcoming Concert\",\"body\":\"Your concert starts in 1 hour at Central Arena!\"},\"badge\":1,\"sound\":\"default\",\"category\":\"EVENT_REMINDER\",\"thread-id\":\"event-12345\"},\"custom-data\":{\"eventId\":\"12345\",\"eventName\":\"Summer Music Fest\",\"venue\":\"Central Arena\",\"startTime\":\"2025-02-23T19:00:00Z\"}}"}",
"TopicArn": "XXXXX (REDACTED)"
}

But from boto3 I cannot do that. If i stringify with json.dumps that payload in the input parameter for the create_schedule in boto that whole json gets considered as a Message of the SNS and not applied as universal target

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I want a way to interpret input as universal target definition

Current Behavior

No way yet to interpret input as universal target definition

Reproduction Steps

Try create_schedule with the same settings and you will see it does not include them and interpret my input as universal definition

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.37.3

Environment details (OS name and version, etc.)

MacOS

Metadata

Metadata

Labels

bugThis issue is a confirmed bug.eventbridgeA low-level client representing Amazon EventBridgep3This is a minor priority issueresponse-requestedWaiting on additional information or feedback.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions