← Blog

Enforce Unique Names for Amazon Bedrock Batch Jobs

Parminder Singh
Parminder Singh··5 min read
Summarize with AI

Amazon Bedrock requires a jobName when an application creates a batch inference job, but the API contract describes its format rather than promising account-wide name uniqueness. A production submission service should reserve a normalized name in local state, bind it to one logical operation and client request token, and treat the returned job ARN as the provider identity. This guide separates that local naming policy from AWS behavior and the later batch execution.

Platform & Architectureai-securityllm-securitycloud-securityarchitectureauditpolicy-enforcement
Enforce Unique Names for Amazon Bedrock Batch Jobs

Amazon Bedrock requires a jobName in every CreateModelInvocationJob request. AWS constrains the field to 1 through 63 characters. It returns a separate jobArn after accepting the batch job. That contract gives engineers a readable label and a provider-issued resource identifier, but it gives no documented promise that a name is globally unique across an account. If operators need one name to identify one logical submission, their application has to enforce that rule before the POST reaches Bedrock.

TL;DR

  • Reserve each normalized batch job name in local state before the first submission attempt.
  • Scope uniqueness explicitly. Use environment and tenant plus workload and the destination AWS account/Region instead of assuming a provider-wide rule.
  • Bind the reservation to one request digest and clientRequestToken. Reject changed-field reuse locally.
  • Treat the returned jobArn as the AWS resource identity. Keep the human-readable name as searchable operational metadata.

AWS defines the field without a uniqueness guarantee

The Amazon Bedrock CreateModelInvocationJob API reference marks jobName as required. Its documented length runs from 1 to 63 characters, and the pattern permits letters, numbers, plus signs, and hyphens, with periods allowed under specific placement rules. The same request includes the model and its input and output data configuration. It also includes the service-role ARN and optional client request token.

On success, Bedrock returns jobArn. AWS says that ARN can be used to stop the job or retrieve its details. The name and ARN therefore have different authority. Your client chooses the name, while AWS assigns the ARN to the accepted resource.

The API page describes name syntax but says nothing about an account-wide or Region-wide uniqueness constraint. Local policy may require uniqueness for incident review and cost attribution, as well as release tracking and operator search. Those are application requirements rather than AWS facts.

Use the LLM API parameter allowlisting guide to keep that distinction visible when rebuilding a final provider request.

A useful name carries bounded operational context

Define a naming grammar that an engineer can read during an incident without turning the field into a secret-bearing metadata channel. A practical structure might include environment, workload, dataset release, and a short operation suffix. Keep tenant names and customer email addresses out of the label. Prompt fragments, ticket descriptions, and regulated data should stay out too.

Normalize the name before reservation by putting case handling, separator rules, maximum segment lengths, accepted characters, and the Unicode policy in one versioned function. Your internal grammar can be narrower than the AWS pattern. Apply it consistently in every deployment path allowed to submit jobs.

Scope the uniqueness key by environment and internal tenant ID, plus the destination AWS account and Bedrock Region. A bare string creates accidental collisions between staging and production.

My blunt opinion is that a timestamp alone is a poor job name. It looks unique until two workers submit in the same clock interval. It also tells the reviewer nothing about the workload that created it.

Atomic reservation closes the concurrency gap

Perform name reservation in a data store that supports a unique constraint or compare-and-set operation. Commit the row before attempt one. Record the normalized name and scope fields, the operation ID and caller identity, the creation time and request digest, and the client request token and reservation state. A read followed by a later insert leaves a race between concurrent workers.

A successful reservation can move through local states such as reserved, submitting, accepted, and reconciliation_required. Keep those workflow labels separate from Amazon Bedrock job statuses. Each state machine answers a different question.

When a second request presents an existing name, compare its operation ID and canonical request digest. An exact replay for the same logical submission should reuse the original clientRequestToken. A changed model or S3 location, role ARN or timeout, or VPC setting or tag set should receive a local conflict. The safe idempotent LLM retries guide explains the parent-operation and child-attempt record needed for ambiguous HTTP outcomes.

Do not release the reservation merely because the client timed out. Bedrock may have accepted the request before the response disappeared, so move that row to reconciliation and preserve its token.

The job ARN becomes the provider identity

The Bedrock GetModelInvocationJob API accepts a job identifier and returns the ARN and name, model ID and status, timestamps and role ARN, and the data configuration and record counts. Attach the returned ARN to the reservation after a successful creation response. Subsequent provider operations should use that identifier rather than trying to rediscover a job by a human label.

Keep the original name in dashboards, tickets, and logs. Retain the normalization version and exact scope tuple so an auditor can reproduce the local uniqueness decision without pretending AWS made it.

On the operations screen, show the job name in a large monospace line. Put the environment and account in smaller text directly below it. Place the Region beside them, followed by the full jobArn. A duplicate reservation should appear as two outlined cards connected to one operation ID, not as two similar names that an engineer has to compare character by character.

The AI audit log schema guide provides common identity, route, policy, and correlation fields for this record.

Release tests should force name collisions

Start with a valid authenticated submission and prove that the local reservation commits before the outbound HTTP call. Then create controlled collisions across every path that can reach the batch API.

  • Launch two workers concurrently with the same normalized name. Require one reservation winner.
  • Change only letter case and verify the chosen normalization rule.
  • Repeat the name in staging and production to test the documented scope.
  • Reuse the name for the same operation and request digest after a dropped response.
  • Reuse it with another model, S3 prefix, role ARN, or timeout and require a local conflict.
  • Crash after reservation but before the POST. Then resume with the original operation and token.
  • Accept the job and store its ARN, then reject a second logical operation under the same scoped name.
  • Bypass the reservation store in an integration fixture and prove monitoring detects an unmanaged submission.

Direct AWS access can create jobs outside your naming service. IAM controls should narrow those paths. Detection can report an unmanaged name. It cannot retroactively apply local policy.

DeepInspect

DeepInspect can inspect authenticated user or agent HTTP calls deliberately routed to CreateModelInvocationJob. It can require the approved naming grammar and scope, check a reservation decision supplied by the submission service, bind the name to the final request digest and client token, and record the returned job ARN with the caller and policy version.

The application owns the atomic reservation store and normalization function, along with the recovery workflow and IAM paths that prevent bypass. AWS owns the accepted batch job and its execution after submission. Direct console actions and SDK calls remain outside DeepInspect's enforcement boundary. The same applies to HTTP traffic that avoids the proxy.

Book a technical deep dive at deepinspect.ai.

Frequently asked questions

Does Amazon Bedrock require every batch job name to be unique?

The current CreateModelInvocationJob API reference requires a name. It documents the field's length and character pattern but does not state a uniqueness scope or guarantee. Enforce any operational uniqueness requirement in your own submission service. Treat it as local policy.

Should the job name contain a tenant or customer name?

Use an opaque internal tenant identifier when the scope needs tenancy. Human customer names and email addresses create unnecessary exposure. So do case text and prompt content when they appear in provider metadata, dashboards, logs, or support exports.

Can a retry reuse the same job name?

A retry for the same logical submission should keep the operation ID, name, request digest, and clientRequestToken stable. If bound job fields change, create a new logical operation under a new reserved name and token.

Is jobName a safe replacement for jobArn?

No. The client supplies jobName, while Bedrock returns jobArn for the accepted resource. Use the ARN for provider operations. Preserve the name as locally governed metadata that helps humans find the record.