hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.86k stars 9.21k forks source link

[New Resource]: aws_sagemaker_inference_component #35226

Open webbermt opened 10 months ago

webbermt commented 10 months ago

Description

Please add a new resource to manage SageMaker inference components.

Requested Resource(s) and/or Data Source(s)

aws_sagemaker_inference_component

Potential Terraform Configuration

resource "aws_sagemaker_inference_component" "ic" {
  name = "my-inference-component"
  endpoint_name = aws_sagemaker_endpoint.example.name
  variant_name = "AllTraffic"

  runtime_config {
    copy_count = 1
  }

  specification {
    model_name = aws_sagemaker_model.example.name

    compute_resource_requirements {
      max_memory_required_in_mb = 32768
      min_memory_required_in_mb = 16384
      number_of_accelerator_devices_required = 1
      number_of_cpu_cores_required = 2
    }

    container {
      artifact_url = "s3://bucket/foo.tar.gz"
      image = "1234567890123.dkr.ecr.us-east-1.amazonaws.com/foo:latest"
      environment = {
        ENV_VAR1 = "foo"
        ENV_VAR2 = "foo2"
      }
    }

    startup_parameters {
      container_startup_health_check_timeout_in_seconds = 60
      model_data_download_timeout_in_seconds = 60
    }
  }

  tags = {
    Name = "foo"
  }
}

References

AWS Documentation AWS SageMaker CreateInferenceComponent API AWS Go SDK v2 SageMaker CreateInterfaceComponent

Would you like to implement a fix?

No

github-actions[bot] commented 10 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue