How to Invoke a Third-Party HTTP API After an AWS Batch Job Succeeds?
Short answer
A Configure an EventBridge rule matching AWS Batch SUCCEEDED events with the third-party API as an API destination target using basic authentication.
Question
Key Takeaways
It tests event-driven integration between AWS Batch and an external HTTP endpoint, and the trap is confusing EventBridge Scheduler (time-based) with EventBridge rules (event-pattern based).
This question tests how to trigger a username/password-protected third-party HTTP API when an AWS Batch job reaches SUCCEEDED, using only serverless components. The correct design is an Amazon EventBridge rule that matches AWS Batch job state-change events and targets an EventBridge API destination configured with basic authentication.
Common mistake: Choosing option B, which uses EventBridge Scheduler plus a Lambda function; Scheduler only fires on a cron/rate schedule and cannot match incoming AWS Batch job SUCCEEDED events, so the job-completion trigger would never work.
Expert Analysis
Why the Answer Is Correct
Option A is the only design where every element matches the stated requirement: a serverless trigger on job completion plus native support for HTTP basic authentication. AWS Batch emits job state-change events (including SUCCEEDED) to the default EventBridge event bus, so an EventBridge rule with a matching event pattern fires the moment the end-of-day batch job finishes. The rule target is an EventBridge API destination, a feature purpose-built to invoke external HTTPS endpoints, and its connection resource stores the username and password that are injected as basic-auth credentials. No servers, polling, or custom code are required, and EventBridge handles retries and dead-letter handling for failed invocations. As one commenter put it, "EventBridge API Destination is specifically designed to send events to HTTP APIs."
Why the Other Options Are Wrong
Option B uses Amazon EventBridge Scheduler, which is a time-based scheduling service (cron and rate expressions) and cannot subscribe to or match AWS Batch job events; adding a Lambda function also adds code and cost for no benefit, since the API destination already supports username/password auth. Option C inverts the direction of integration: AWS Batch cannot publish its SUCCEEDED events into API Gateway, and API Gateway cannot subscribe to EventBridge job events, so the job-completion trigger does not exist. Option D has the same impossible Batch-to-API-Gateway publish step, and then adds an unnecessary Lambda layer between API Gateway and the third-party API. As one learner noted, "EventBridge Schedule will not work as it will allow us to" act on a schedule rather than when an event occurs.
Community Comment Notes
Most voters landed on A, and venutadi pointed to the AWS blog on using API destinations with EventBridge, which documents exactly this pattern. LeonSauveterre noted that Scheduler is unnecessary because EventBridge rules already match Batch job events, and that "Introducing Lambda functions adds complexity and costs." Sergiuss95 preferred B to fetch credentials from Secrets Manager, which is a valid hardening technique but does not fix Scheduler's inability to react to job events. sandordini captured the real doubt here: "Both A and B seem to be viable," while Scheldon resolved it by observing that a rule reacts to events, whereas a schedule only fires on a timetable.
Official Reference
- https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html
- https://docs.aws.amazon.com/batch/latest/userguide/batch_cwe_events.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When a scenario needs an action after an AWS service event, look for an EventBridge rule with an event pattern, not a schedule. If the target is an external HTTP API that uses username/password, the API destination plus connection answer is almost always the intended one.
Frequently Asked Questions
Why is EventBridge Scheduler wrong for triggering on an AWS Batch job SUCCEEDED event?
Can an EventBridge API destination store the third-party username and password?
Community Votes
70% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 12 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 12
-
venutadi 👍 13 Answered Ahttps://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/ Amazon EventBridge enables developers to route events between AWS services, integrated software as a service (SaaS) applications, and your own applications. It can help decouple applications and produce more extensible, maintainable architectures. With the new API destinations feature, EventBridge can now integrate with services outside of AWS using REST API calls.
-
sandordini 👍 5I'm confused. Both A and B seem to be viable. There is no requirement of cost, complexity, or overhead. :S
-
AlvinC2024 👍 4 Answered AA. Configure an Amazon EventBridge rule to match incoming AWS Batch job SUCCEEDED events. Configure the third-party API as an EventBridge API destination with a username and password. Set the API destination as the EventBridge rule target. This option is the most direct and serverless approach to meeting the requirements. Amazon EventBridge can detect the successful completion of the AWS Batch job and trigger actions based on this event. By configuring the third-party API as an API destination with authentication credentials, EventBridge can directly invoke the third-party reporting application without the need for additional services. This approach minimizes complexity and operational overhead.
-
alawada 👍 3 Answered DCreate an AWS Lambda function responsible for invoking the third-party reporting application's HTTP API endpoint. The Lambda function will be triggered by the successful completion of the AWS Batch job.
-
Sergiuss95 👍 3 Answered BI think is better to programming a lambda and obtain user and password from Secret Manager... So I think the better solution is B
Show 7 more comments
-
k_k_kkk 👍 3 Answered BAWS Batch sends job status change to EventBridge. https://docs.aws.amazon.com/batch/latest/userguide/batch_cwe_events.html
-
LeonSauveterre 👍 2 Answered AA - EventBridge API Destination is specifically designed to send events to HTTP APIs. It supports basic authentication (username and password), which fits the requirement for 3rd-party API authentication. B - OK, but EventBridge Scheduler is unnecessary because EventBridge rules can already match Batch job events. Introducing Lambda functions adds complexity and costs. C - An HTTP proxy integration on API Gateway cannot handle authentication directly. We still need to manage username and password authentication separately. D - OK, but even more complex than option B.
-
boluwatito 👍 2 Answered BConfigure Amazon EventBridge Scheduler to match incoming AWS Batch job SUCCEEDED events. Configure an AWS Lambda function to invoke the third-party API using a username and password. Set the Lambda function as the EventBridge rule target.
-
bujuman 👍 1 Answered AEven though option A and B could do the trick and also no statement related to least effort is rquested, EventBridge is dedicated for similar use case. https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html Plus, it can also handle basic authentication https://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/
-
Scheldon 👍 1 Answered AAnswerA EventBridge Schedule will not work as it will allow us to "do something" per schedule. EventBridge rule will allow us to "do something" when event will occur. I think there is no possibility to publish/send job "SUCCEEDED" to AMAZON API Gateway REST API or that we can do anykind of integration with AMAZON API Gateway, hence I would choose A
-
Oluwatosin09 👍 1 Answered BAnswer should be B.
-
osmk 👍 1look like B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →