Skip to content

Add BedrockImportedModel resource type #989

Description

@aws-khargita

Description

Bedrock Imported Models (created via CreateModelImportJob) are not covered by aws-nuke. The existing BedrockCustomModel resource only handles models from CreateModelCustomizationJob using the ListCustomModels API. Imported models use a separate API surface and persist with ongoing storage charges until explicitly deleted.

Impact

Nuke completes with exit code 0 but imported models survive, causing silent ongoing CustomModelImport-Storage billing.

Relevant APIs

Operation API
List bedrock:ListImportedModels
Delete bedrock:DeleteImportedModel
Describe bedrock:GetImportedModel

Reproduction

# Import a model
aws bedrock create-model-import-job \
  --job-name test-import \
  --imported-model-name test-model \
  --role-arn arn:aws:iam::123456789012:role/BedrockRole \
  --model-data-source '{"s3DataSource":{"s3Uri":"s3://bucket/model/"}}'

# Run aws-nuke — model is never discovered or deleted
aws bedrock list-imported-models  # still returns the model

Suggested Implementation

New resource type BedrockImportedModel following the same pattern as BedrockCustomModel:

  • List via ListImportedModels (paginated, supports nextToken)
  • Delete via DeleteImportedModel using model name or ARN
  • Properties: Name, ARN, CreationTime, tags via ListTagsForResource

ARN pattern: arn:aws:bedrock:<region>:<account>:imported-model/<id>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions