I'm trying to automate the use case submission for accessing Anthropic models in AWS Bedrock.
I'm attempting to submit formData using the AWS CLI (and boto3 library). In all cases I'm getting the following error: An error occurred (ValidationException) when calling the PutUseCaseForModelAccess operation: Invalid form data.
I've reduced this to re-submitting the data that's already been submitted using aws bedrock put-use-case-for-model-access --form-data <data>
where comes from the formData field output by aws bedrock get-use-case-for-model-access --profile prod
.
I note that when using the CLI (although not boto3) that the formData is double encoded so I need to use aws bedrock get-use-case-for-model-access --profile prod --region eu-west-1 --query formData --output text | base64 -D | base64 -D
to get the original form (note base64 -D
twice).
Can you help me figure out what is going on?
I'm kind of operating blind without having found any documentation that details the valid shape.
After a lot of experimentation I found that:
{"companyName":"","companyWebsite":"","intendedUsers":"0","industryOption":"","otherIndustryOption":"","useCases":""}
where intendedUsers is 0
for internal and industryOption should be the value from the drop down in the form.
Note/warning: As far as I can tell, this is a one-off operation. Re-submitting a use-case does not update it.