Skip to content

[Bug] Batch API - file upload throwing 403 error due to entire s3 object key has been used #23904

@shivamrawat1

Description

@shivamrawat1

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

As part of batch api validation, I am trying to upload file using “/v1/files” endpoint. Here is the sample curl used to upload file.

 

curl --request POST
 
  --url https://litellm-int.url/v1/files
 
  --header 'authorization: Bearer virtualkey'
 
  --header 'content-type: multipart/form-data'
 
  --form purpose=batch
 
  --form 'file=@batch_requests.jsonl'
 
  --form target_model_names=claude-sonnet-4-5-20250929-batch

 

While upload file, I am getting the below 403 error. It seems like entire s3 object key has been used to push files to applogs folder.

 

[92m17:40:13 - LiteLLM:ERROR[0m: s3_v2.py:351 - Error uploading to s3: Client error '403 Forbidden' for url 'https://s3.amazonaws.com/bucket-int/LiteLLMAPPLogs/2026-03-09/time-17-40-11-901585_s3://bucket-int/litellm-bedrock-files-us.anthropic.claude-sonnet-4-5-20250929-v1-0-29ea93-452e-8a2f.jsonl.json'

claude-sonnet-4-5-20250929-batch from bedrock

model_name: claude-sonnet-4-5-20250929-batch litellm_params: model: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0 aws_region_name: us-east-1 # Batch-specific parameters for Bedrock Batch API s3_bucket_name: aicoe-litellm-batch-bucket-dev s3_region_name: us-east-1 aws_batch_role_arn: os.environ/BEDROCK_BATCH_ROLE_ARN model_info: mode: batch

Steps to Reproduce

The model being used

claude-sonnet-4-5-20250929-batch from bedrock

model_name: claude-sonnet-4-5-20250929-batch litellm_params: model: bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0 aws_region_name: us-east-1 # Batch-specific parameters for Bedrock Batch API s3_bucket_name: aicoe-litellm-batch-bucket-dev s3_region_name: us-east-1 aws_batch_role_arn: os.environ/BEDROCK_BATCH_ROLE_ARN model_info: mode: batch

Relevant log output

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.82.0

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions