AwsBedrockApiKeyArgs
interface AwsBedrockApiKeyArgs {
allowLongTermCredential: true;
awsManagedPolicyArns?: Record<string, Input<string>>;
credentialAgeDays: number;
customPolicies?: Record<string, AwsIamPolicyArgs>;
name: string;
}Arguments for an expiring long-term Bedrock bearer API key.
Remarks
AWS recommends short-term bearer tokens for production. This capability creates an IAM-user-bound credential for exploration and requires explicit acknowledgement of that risk.
Example
CODE
const apiKey: AwsBedrockApiKeyArgs = {
name: 'thirdPartyIntegration',
credentialAgeDays: 396,
allowLongTermCredential: true,
awsManagedPolicyArns: {
invokeModel: 'AmazonBedrockLimitedAccess',
},
};Properties
allowLongTermCredential: true
Explicit acknowledgement that long-term Bedrock API keys are not recommended for production.
awsManagedPolicyArns: Record<string, Input<string>>
AWS-managed policy ARNs or names to attach to the generated IAM user, keyed by stable attachment identity.
credentialAgeDays: number
Required API-key lifetime in days, capped at 396 days for a one-year-plus-one-month rollover window.
customPolicies: Record<string, AwsIamPolicyArgs>
Custom IAM policies to create and attach to the generated IAM user, keyed by stable attachment identity.
name: string
Camel-case purpose used for the managed IAM user and component identity.