miguelrc-aws commited on
Commit
f312c15
1 Parent(s): 942a82a

update readme

Browse files
Files changed (1) hide show
  1. README.md +8 -5
README.md CHANGED
@@ -6855,22 +6855,25 @@ import requests
6855
  from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
6856
 
6857
  region = "us-east-1"
6858
- base_uri = f"preprod.{region}.controlplane.bedrock.aws.dev"
6859
  batch_job_uri = f"https://{base_uri}/model-invocation-job/"
6860
 
6861
- role_arn = "arn:aws:iam::750485122747:role/BedrockServiceRole"
 
 
 
6862
  payload = {
6863
  "inputDataConfig": {
6864
  "s3InputDataConfig": {
6865
- "s3Uri": "s3://gnovack-bedrock-data/batch-input/",
6866
  "s3InputFormat": "JSONL"
6867
  }
6868
  },
6869
- "jobName": "embeddings-v2-test-job-9",
6870
  "modelId": "amazon.titan-embed-text-v2",
6871
  "outputDataConfig": {
6872
  "s3OutputDataConfig": {
6873
- "s3Uri": "s3://gnovack-bedrock-data/batch-output/"
6874
  }
6875
  },
6876
  "roleArn": role_arn
 
6855
  from aws_requests_auth.boto_utils import BotoAWSRequestsAuth
6856
 
6857
  region = "us-east-1"
6858
+ base_uri = f"bedrock.{region}.amazonaws.com"
6859
  batch_job_uri = f"https://{base_uri}/model-invocation-job/"
6860
 
6861
+ # For details on how to set up an IAM role for batch inference, see
6862
+ # https://docs.aws.amazon.com/bedrock/latest/userguide/batch-inference-permissions.html
6863
+ role_arn = "arn:aws:iam::111122223333:role/my-batch-inference-role"
6864
+
6865
  payload = {
6866
  "inputDataConfig": {
6867
  "s3InputDataConfig": {
6868
+ "s3Uri": "s3://my-input-bucket/batch-input/",
6869
  "s3InputFormat": "JSONL"
6870
  }
6871
  },
6872
+ "jobName": "embeddings-v2-batch-job",
6873
  "modelId": "amazon.titan-embed-text-v2",
6874
  "outputDataConfig": {
6875
  "s3OutputDataConfig": {
6876
+ "s3Uri": "s3://my-output-bucket/batch-output/"
6877
  }
6878
  },
6879
  "roleArn": role_arn