{"record":{"id":"1537d85e616ef9ff","repo":"BerriAI/litellm","slug":"input-file-id-is-required-for-bedrock-batch-creati","errorCode":null,"errorMessage":"input_file_id is required for Bedrock batch creation","messagePattern":"input_file_id is required for Bedrock batch creation","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/batches/transformation.py","lineNumber":166,"sourceCode":"        model: str,\n        create_batch_data: CreateBatchRequest,\n        optional_params: dict,\n        litellm_params: dict,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Transform the batch creation request to Bedrock format.\n\n        Bedrock batch inference requires:\n        - modelId: The Bedrock model ID\n        - jobName: Unique name for the batch job\n        - inputDataConfig: Configuration for input data (S3 location)\n        - outputDataConfig: Configuration for output data (S3 location)\n        - roleArn: IAM role ARN for the batch job\n        \"\"\"\n        # Get required parameters\n        input_file_id: Final = create_batch_data.get(\"input_file_id\")\n        if not input_file_id:\n            raise ValueError(\"input_file_id is required for Bedrock batch creation\")\n\n        # Extract S3 information from file ID using common utility\n        input_bucket, input_key = self.common_utils.parse_s3_uri(input_file_id)\n\n        # Get output S3 configuration\n        output_bucket = litellm_params.get(\"s3_output_bucket_name\") or os.getenv(\"AWS_S3_OUTPUT_BUCKET_NAME\")\n        if not output_bucket:\n            # Use same bucket as input if no output bucket specified\n            output_bucket = input_bucket\n\n        # Get IAM role ARN\n        role_arn: Final = (\n            litellm_params.get(\"aws_batch_role_arn\")\n            or optional_params.get(\"aws_batch_role_arn\")\n            or os.getenv(\"AWS_BATCH_ROLE_ARN\")\n        )\n        if not role_arn:\n            raise ValueError(","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/batches/transformation.py#L148-L184","documentation":"Request-shaping guard when transforming an OpenAI batch create to Bedrock model invocation: the Bedrock format needs an S3 input location, and the input_file_id (the uploaded JSONL file identifier) was missing, so inputDataConfig cannot be built.","triggerScenarios":"Thrown at litellm/llms/bedrock/batches/transformation.py:166 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass input_file_id referencing an uploaded JSONL batch input file.","Upload the batch input file first via the files API, then use its id.","Verify the file id is correct and belongs to Bedrock."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}