amplify-backend
amplify-backend copied to clipboard
Amazon Nova Pro in APAC
Environment information
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M4
Memory: 167.31 MB / 16.00 GB
Shell: /bin/zsh
Binaries:
Node: 23.7.0 - /opt/homebrew/bin/node
Yarn: undefined - undefined
npm: 11.1.0 - /opt/homebrew/bin/npm
pnpm: undefined - undefined
NPM Packages:
@aws-amplify/auth-construct: 1.6.1
@aws-amplify/backend: 1.14.3
@aws-amplify/backend-ai: Not Found
@aws-amplify/backend-auth: 1.5.1
@aws-amplify/backend-cli: 1.5.0
@aws-amplify/backend-data: 1.4.1
@aws-amplify/backend-deployer: 1.1.20
@aws-amplify/backend-function: 1.12.3
@aws-amplify/backend-output-schemas: 1.4.1
@aws-amplify/backend-output-storage: 1.1.5
@aws-amplify/backend-secret: 1.2.0
@aws-amplify/backend-storage: 1.2.6
@aws-amplify/cli-core: 1.4.1
@aws-amplify/client-config: 1.5.8
@aws-amplify/data-construct: 1.15.1
@aws-amplify/data-schema: 1.20.3
@aws-amplify/deployed-backend-client: 1.5.2
@aws-amplify/form-generator: 1.0.5
@aws-amplify/model-generator: 1.0.13
@aws-amplify/platform-core: 1.6.5
@aws-amplify/plugin-types: 1.8.1
@aws-amplify/sandbox: 1.2.12
@aws-amplify/schema-generator: 1.2.8
aws-amplify: 6.14.1
aws-cdk: 2.1007.0
aws-cdk-lib: 2.192.0
typescript: 5.8.3
No AWS environment variables
No CDK environment variables
Describe the bug
"Amazon Nova Pro" as defined in supported models does not work in APAC.
Reproduction steps
When I input "aiModel: a.ai.model("Amazon Nova Pro")", I have the following runtime error in ChatDefaultConversation Lambda function.
ValidationException: Invocation of model ID amazon.nova-pro-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.
The Bedrock documentation says to use "apac.amazon.nova-pro-v1:0". However, when I input as "aiModel: { resourcePath: 'apac.amazon.nova-pro-v1:0'}", I get another runtime error.
AccessDeniedException: User: XXX is not authorized to perform: bedrock:InvokeModelWithResponseStream on resource: arn:aws:bedrock:ap-northeast-1:XXX:inference-profile/apac.amazon.nova-pro-v1:0 because no identity-based policy allows the bedrock:InvokeModelWithResponseStream action
However, I can hack it to work by changing IAM permissions of the ChatDefaultConversation Lambda function to including the following resources.
"arn:aws:bedrock:ap-northeast-1::inference-profile/apac.amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-northeast-1::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-northeast-2::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-northeast-3::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-southeast-1::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-southeast-2::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-south-1::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:ap-south-2::foundation-model/amazon.nova-pro-v1:0"
While I have a workaround, hacking it in for every new build is a bit onerous.