-
Notifications
You must be signed in to change notification settings - Fork 292
Add tag for cost management #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -6,4 +6,7 @@ import { createStacks } from '../lib/create-stacks'; | |||
|
|||
const app = new cdk.App(); | |||
const params = getParams(app); | |||
if (params.tag?.key && params.tag?.value) { | |||
cdk.Tags.of(app).add(params.tag.key, params.tag.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KnowledgeBase を有効化していた場合にタグを新たにつけると破壊的変更になってしまうため、タグ無しの場合はタグをつけないように修正
// NOTE: InvokeModelWithBidirectionalStreamCommand currently does not support Inference Profile Arn. | ||
// When AWS adds support, uncomment the code block below and change 'const' to 'let' for modelIdOrArn. | ||
|
||
const modelIdOrArn = event.model.modelId; // Fallback to modelId for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InvokeModelWithBidirectionalStreamCommand が Inference Profile Arn (タグ) は対応していないが将来的な対応及び他との実装に合わせるため
for (const modelId of modelIds) { | ||
// Inference Profile is not supported Cross Region Inference | ||
if ( | ||
modelId.region === currentRegion && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cross region inference は inference profile を2025/7/6 時点作成できないため
Description of Changes
Apply an Application Inference Profile to Bedrock models to tag model inferences.
Also apply tags to the entire CDK asset
Checklist
npm run cdk:test
and if there are snapshot differences, executenpm run cdk:test:update-snapshot
to update snapshotsRelated Issues
#702 #650