diff --git a/.changelog/38575.txt b/.changelog/38575.txt new file mode 100644 index 00000000000..372b3627af2 --- /dev/null +++ b/.changelog/38575.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +data-source/aws_sagemaker_prebuilt_ecr_image: Support additional `repository_name` values. See [documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/sagemaker_prebuilt_ecr_image#repository_name) for details +``` diff --git a/internal/service/sagemaker/prebuilt_ecr_image_data_source.go b/internal/service/sagemaker/prebuilt_ecr_image_data_source.go index 1f66081d346..1c8b5a5467e 100644 --- a/internal/service/sagemaker/prebuilt_ecr_image_data_source.go +++ b/internal/service/sagemaker/prebuilt_ecr_image_data_source.go @@ -7,7 +7,6 @@ import ( "context" "fmt" - "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" @@ -17,328 +16,706 @@ import ( ) const ( + // SageMaker Algorithm AutoGluon Training + RepositoryAutoGluonTraining = "autogluon-training" + // SageMaker Algorithm AutoGluon Inference + RepositoryAutoGluonInference = "autogluon-inference" // SageMaker Algorithm BlazingText - repositoryBlazingText = "blazingtext" + RepositoryBlazingText = "blazingtext" + // SageMaker DLC Chainer + RepositoryChainer = "sagemaker-chainer" + // SageMaker Algorithm Clarify + RepositoryClarify = "sagemaker-clarify-processing" + // SageMaker Algorithm DJL DeepSpeed + RepositoryDJLDeepSpeed = "djl-inference" + // SageMaker Algorithm Data Wrangler + RepositoryDataWrangler = "sagemaker-data-wrangler-container" + // SageMaker Algorithm Debugger + RepositoryDebugger = "sagemaker-debugger-rules" // SageMaker Algorithm DeepAR Forecasting - repositoryDeepARForecasting = "forecasting-deepar" + RepositoryDeepARForecasting = "forecasting-deepar" // SageMaker Algorithm Factorization Machines - repositoryFactorizationMachines = "factorization-machines" - // SageMaker Algorithm Image Classification - repositoryImageClassification = "image-classification" + RepositoryFactorizationMachines = "factorization-machines" + // SageMaker Algorithm HuggingFace TensorFlow Training + RepositoryHuggingFaceTensorFlowTraining = "huggingface-tensorflow-training" + // SageMaker Algorithm HuggingFace PyTorch Training + RepositoryHuggingFacePyTorchTraining = "huggingface-pytorch-training" + // SageMaker Algorithm HuggingFace PyTorch Training NeuronX + RepositoryHuggingFacePyTorchTrainingNeuronX = "huggingface-pytorch-training-neuronx" + // SageMaker Algorithm HuggingFace PyTorch Training Compiler + RepositoryHuggingFacePyTorchTrainingCompiler = "huggingface-pytorch-trcomp-training" + // SageMaker Algorithm HuggingFace TensorFlow Training Compiler + RepositoryHuggingFaceTensorFlowTrainingCompiler = "huggingface-tensorflow-trcomp-training" + // SageMaker Algorithm HuggingFace TensorFlow Inference + RepositoryHuggingFaceTensorFlowInference = "huggingface-tensorflow-inference" + // SageMaker Algorithm HuggingFace PyTorch Inference + RepositoryHuggingFacePyTorchInference = "huggingface-pytorch-inference" + // SageMaker Algorithm HuggingFace PyTorch Inference Neuron + RepositoryHuggingFacePyTorchInferenceNeuron = "huggingface-pytorch-inference-neuron" + // SageMaker Algorithm HuggingFace PyTorch Inference NeuronX + RepositoryHuggingFacePyTorchInferenceNeuronX = "huggingface-pytorch-inference-neuronx" + // SageMaker LLM HuggingFace Pytorch TGI Inference + RepositoryHuggingFacePyTorchTGIInference = "huggingface-pytorch-tgi-inference" + // SageMaker Algorithm HuggingFace TEI + RepositoryHuggingFaceTEI = "tei" + // SageMaker Algorithm HuggingFace TEI CPU + RepositoryHuggingFaceTEICPU = "tei-cpu" // SageMaker Algorithm IP Insights - repositoryIPInsights = "ipinsights" + RepositoryIPInsights = "ipinsights" + // SageMaker Algorithm Image Classification + RepositoryImageClassification = "image-classification" + // SageMaker DLC Inferentia MXNet + RepositoryInferentiaMXNet = "sagemaker-neo-mxnet" + // SageMaker DLC Inferentia PyTorch + RepositoryInferentiaPyTorch = "sagemaker-neo-pytorch" // SageMaker Algorithm k-means - repositoryKMeans = "kmeans" + RepositoryKMeans = "kmeans" // SageMaker Algorithm k-nearest-neighbor - repositoryKNearestNeighbor = "knn" + RepositoryKNearestNeighbor = "knn" // SageMaker Algorithm Latent Dirichlet Allocation - repositoryLDA = "lda" + RepositoryLDA = "lda" // SageMaker Algorithm Linear Learner - repositoryLinearLearner = "linear-learner" + RepositoryLinearLearner = "linear-learner" + // SageMaker DLC MXNet Training + RepositoryMXNetTraining = "mxnet-training" + // SageMaker DLC MXNet Inference + RepositoryMXNetInference = "mxnet-inference" + // SageMaker DLC MXNet Inference EIA + RepositoryMXNetInferenceEIA = "mxnet-inference-eia" + // SageMaker DLC SageMaker MXNet + RepositorySageMakerMXNet = "sagemaker-mxnet" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC SageMaker MXNet Serving + RepositorySageMakerMXNetServing = "sagemaker-mxnet-serving" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC SageMaker MXNet EIA + RepositorySageMakerMXNetEIA = "sagemaker-mxnet-eia" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC SageMaker MXNet Serving EIA + RepositorySageMakerMXNetServingEIA = "sagemaker-mxnet-serving-eia" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC MXNet Coach + RepositoryMXNetCoach = "sagemaker-rl-mxnet" // SageMaker Model Monitor - repositoryModelMonitor = "sagemaker-model-monitor-analyzer" + RepositoryModelMonitor = "sagemaker-model-monitor-analyzer" // SageMaker Algorithm Neural Topic Model - repositoryNeuralTopicModel = "ntm" - // SageMaker Algorithm Object2Vec - repositoryObject2Vec = "object2vec" + RepositoryNeuralTopicModel = "ntm" + // SageMaker Algorithm Neo Image Classification + RepositoryNeoImageClassification = "image-classification-neo" + // SageMaker DLC Neo MXNet + RepositoryNeoMXNet = "sagemaker-inference-mxnet" + // SageMaker DLC Neo PyTorch + RepositoryNeoPyTorch = "sagemaker-inference-pytorch" + // SageMaker DLC Neo Tensorflow + RepositoryNeoTensorflow = "sagemaker-inference-tensorflow" + // SageMaker DLC Neo XGBoost + RepositoryNeoXGBoost = "xgboost-neo" // SageMaker Algorithm Object Detection - repositoryObjectDetection = "object-detection" + RepositoryObjectDetection = "object-detection" + // SageMaker Algorithm Object2Vec + RepositoryObject2Vec = "object2vec" // SageMaker Algorithm PCA - repositoryPCA = "pca" + RepositoryPCA = "pca" + // SageMaker DLC PyTorch Training + RepositoryPyTorchTraining = "pytorch-training" + // SageMaker DLC PyTorch Training NeuronX + RepositoryPyTorchTrainingNeuronX = "pytorch-training-neuronx" + // SageMaker DLC PyTorch Training Compiler + RepositoryPyTorchTrainingCompiler = "pytorch-trcomp-training" + // SageMaker DLC SageMaker PyTorch Inference + RepositoryPyTorchInference = "pytorch-inference" + // SageMaker DLC PyTorch Inference EIA + RepositoryPyTorchInferenceEIA = "pytorch-inference-eia" + // SageMaker DLC PyTorch Inference Graviton + RepositoryPyTorchInferenceGraviton = "pytorch-inference-graviton" + // SageMaker DLC PyTorch Inference NeuronX + RepositoryPyTorchInferenceNeuronX = "pytorch-inference-neuronx" + // SageMaker DLC SageMaker PyTorch + RepositorySageMakerPyTorch = "sagemaker-pytorch" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name // SageMaker Algorithm Random Cut Forest - repositoryRandomCutForest = "randomcutforest" + RepositoryRandomCutForest = "randomcutforest" + // SageMaker DLC RL Ray PyTorch + RepositoryRLRayPyTorch = "sagemaker-rl-ray-container" + // SageMaker DLC RL Coach Tensorflow + RepositoryRLCoachPyTorch = "sagemaker-rl-coach-container" + // SageMaker Library scikit-learn + RepositoryScikitLearn = "sagemaker-scikit-learn" // SageMaker Algorithm Semantic Segmentation - repositorySemanticSegmentation = "semantic-segmentation" + RepositorySemanticSegmentation = "semantic-segmentation" // SageMaker Algorithm Seq2Seq - repositorySeq2Seq = "seq2seq" - // SageMaker Algorithm XGBoost - repositoryXGBoost = "sagemaker-xgboost" - // SageMaker Library scikit-learn - repositoryScikitLearn = "sagemaker-scikit-learn" - // SageMaker Library Spark ML - repositorySparkML = "sagemaker-sparkml-serving" - // SageMaker Library TensorFlow Serving - repositoryTensorFlowServing = "sagemaker-tensorflow-serving" - // SageMaker Library TensorFlow Serving EIA - repositoryTensorFlowServingEIA = "sagemaker-tensorflow-serving-eia" - // SageMaker Repo MXNet Inference - repositoryMXNetInference = "mxnet-inference" - // SageMaker Repo MXNet Inference EIA - repositoryMXNetInferenceEIA = "mxnet-inference-eia" - // SageMaker Repo MXNet Training - repositoryMXNetTraining = "mxnet-training" - // SageMaker Repo PyTorch Inference - repositoryPyTorchInference = "pytorch-inference" - // SageMaker Repo PyTorch Inference EIA - repositoryPyTorchInferenceEIA = "pytorch-inference-eia" - // SageMaker Repo PyTorch Training - repositoryPyTorchTraining = "pytorch-training" - // SageMaker Repo TensorFlow Inference - repositoryTensorFlowInference = "tensorflow-inference" + RepositorySeq2Seq = "seq2seq" + // SageMaker Algorithm Spark + RepositorySpark = "sagemaker-spark-processing" + // SageMaker Algorithm Spark ML + RepositorySparkML = "sagemaker-sparkml-serving" + // SageMaker DLC TensorFlow Training + RepositoryTensorFlowTraining = "tensorflow-training" + // SageMaker DLC TensorFlow Inference + RepositoryTensorFlowInference = "tensorflow-inference" // SageMaker Repo TensorFlow Inference EIA - repositoryTensorFlowInferenceEIA = "tensorflow-inference-eia" - // SageMaker Repo TensorFlow Training - repositoryTensorFlowTraining = "tensorflow-training" - // SageMaker Repo HuggingFace TensorFlow Training - repositoryHuggingFaceTensorFlowTraining = "huggingface-tensorflow-training" - // SageMaker Repo HuggingFace TensorFlow Inference - repositoryHuggingFaceTensorFlowInference = "huggingface-tensorflow-inference" - // SageMaker Repo HuggingFace PyTorch Training - repositoryHuggingFacePyTorchTraining = "huggingface-pytorch-training" - // SageMaker Repo HuggingFace PyTorch Inference - repositoryHuggingFacePyTorchInference = "huggingface-pytorch-inference" + RepositoryTensorFlowInferenceEIA = "tensorflow-inference-eia" + // SageMaker DLC TensorFlow Inference Graviton + RepositoryTensorFlowInferenceGraviton = "tensorflow-inference-graviton" + // SageMaker DLC SageMaker TensorFlow + RepositorySageMakerTensorFlow = "sagemaker-tensorflow" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC SageMaker TensorFlow EIA + RepositorySageMakerTensorFlowEIA = "sagemaker-tensorflow-eia" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC SageMaker TensorFlow Serving + RepositoryTensorFlowServing = "sagemaker-tensorflow-serving" + // SageMaker DLC SageMaker TensorFlow Serving EIA + RepositoryTensorFlowServingEIA = "sagemaker-tensorflow-serving-eia" + // SageMaker DLC SageMaker TensorFlow Serving + RepositorySageMakerTensorFlowScriptMode = "sagemaker-tensorflow-scriptmode" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker DLC Tensorflow Coach + RepositoryTensorflowCoach = "sagemaker-rl-tensorflow" + // SageMaker DLC Tensorflow Inferentia + RepositoryTensorflowInferentia = "sagemaker-neo-tensorflow" + // SageMaker Algorithm StabilityAI + RepositoryStabilityAI = "stabilityai-pytorch-inference" + // SageMaker Algorithm VW + RepositoryVW = "sagemaker-rl-vw-container" + // SageMaker Algorithm XGBoost + RepositoryXGBoost = "sagemaker-xgboost" + // SageMaker Base Python + RepositorySageMakerBasePython = "sagemaker-base-python" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker Geospatial + RepositorySageMakerGeospatial = "sagemaker-geospatial-v1-0" // nosemgrep:ci.sagemaker-in-var-name,ci.sagemaker-in-const-name + // SageMaker NVIDIA Triton Inference + RepositoryNVIDIATritonInference = "sagemaker-tritonserver" ) // https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/blazingtext.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/image-classification.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/object-detection.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/semantic-segmentation.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/seq2seq.json + +var PrebuiltECRImageIDByRegion_blazing = map[string]string{ + names.AFSouth1RegionID: "455444449433", + names.APEast1RegionID: "286214385809", + names.APNortheast1RegionID: "501404015308", + names.APNortheast2RegionID: "306986355934", + names.APNortheast3RegionID: "867004704886", + names.APSouth1RegionID: "991648021394", + names.APSouth2RegionID: "628508329040", + names.APSoutheast1RegionID: "475088953585", + names.APSoutheast2RegionID: "544295431143", + names.APSoutheast3RegionID: "951798379941", + names.APSoutheast4RegionID: "106583098589", + names.CACentral1RegionID: "469771592824", + names.CAWest1RegionID: "190319476487", + names.CNNorth1RegionID: "390948362332", + names.CNNorthwest1RegionID: "387376663083", + names.EUCentral1RegionID: "813361260812", + names.EUCentral2RegionID: "680994064768", + names.EUNorth1RegionID: "669576153137", + names.EUSouth1RegionID: "257386234256", + names.EUSouth2RegionID: "104374241257", + names.EUWest1RegionID: "685385470294", + names.EUWest2RegionID: "644912444149", + names.EUWest3RegionID: "749696950732", + names.ILCentral1RegionID: "898809789911", + names.MECentral1RegionID: "272398656194", + names.MESouth1RegionID: "249704162688", + names.SAEast1RegionID: "855470959533", + names.USEast1RegionID: "811284229777", + names.USEast2RegionID: "825641698319", + names.USGovEast1RegionID: "237065988967", + names.USGovWest1RegionID: "226302683700", + names.USISOEast1RegionID: "490574956308", + names.USISOBEast1RegionID: "765400339828", + names.USWest1RegionID: "632365934929", + names.USWest2RegionID: "433757028032", +} -var prebuiltECRImageIDByRegion_blazing = map[string]string{ - endpoints.AfSouth1RegionID: "455444449433", - endpoints.ApEast1RegionID: "286214385809", - endpoints.ApNortheast1RegionID: "501404015308", - endpoints.ApNortheast2RegionID: "306986355934", - endpoints.ApNortheast3RegionID: "867004704886", - endpoints.ApSouth1RegionID: "991648021394", - endpoints.ApSoutheast1RegionID: "475088953585", - endpoints.ApSoutheast2RegionID: "544295431143", - endpoints.CaCentral1RegionID: "469771592824", - endpoints.CnNorth1RegionID: "390948362332", - endpoints.CnNorthwest1RegionID: "387376663083", - endpoints.EuCentral1RegionID: "813361260812", - endpoints.EuNorth1RegionID: "669576153137", - endpoints.EuSouth1RegionID: "257386234256", - endpoints.EuWest1RegionID: "685385470294", - endpoints.EuWest2RegionID: "644912444149", - endpoints.EuWest3RegionID: "749696950732", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "249704162688", - endpoints.SaEast1RegionID: "855470959533", - endpoints.UsEast1RegionID: "811284229777", - endpoints.UsEast2RegionID: "825641698319", - endpoints.UsGovWest1RegionID: "226302683700", - endpoints.UsWest1RegionID: "632365934929", - endpoints.UsWest2RegionID: "433757028032", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/clarify.json + +var PrebuiltECRImageIDByRegion_clarify = map[string]string{ + names.AFSouth1RegionID: "811711786498", + names.APEast1RegionID: "098760798382", + names.APNortheast1RegionID: "377024640650", + names.APNortheast2RegionID: "263625296855", + names.APNortheast3RegionID: "912233562940", + names.APSouth1RegionID: "452307495513", + names.APSoutheast1RegionID: "834264404009", + names.APSoutheast2RegionID: "007051062584", + names.APSoutheast3RegionID: "705930551576", + names.CACentral1RegionID: "675030665977", + names.CNNorth1RegionID: "122526803553", + names.CNNorthwest1RegionID: "122578899357", + names.EUCentral1RegionID: "017069133835", + names.EUNorth1RegionID: "763603941244", + names.EUSouth1RegionID: "638885417683", + names.EUWest1RegionID: "131013547314", + names.EUWest2RegionID: "440796970383", + names.EUWest3RegionID: "341593696636", + names.MESouth1RegionID: "835444307964", + names.SAEast1RegionID: "520018980103", + names.USEast1RegionID: "205585389593", + names.USEast2RegionID: "211330385671", + names.USGovWest1RegionID: "598674086554", + names.USWest1RegionID: "740489534195", + names.USWest2RegionID: "306415355426", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/data-wrangler.json + +var PrebuiltECRImageIDByRegion_dataWrangler = map[string]string{ + names.AFSouth1RegionID: "143210264188", + names.APEast1RegionID: "707077482487", + names.APNortheast1RegionID: "649008135260", + names.APNortheast2RegionID: "131546521161", + names.APNortheast3RegionID: "913387583493", + names.APSouth1RegionID: "089933028263", + names.APSoutheast1RegionID: "119527597002", + names.APSoutheast2RegionID: "422173101802", + names.CACentral1RegionID: "557239378090", + names.CNNorth1RegionID: "245909111842", + names.CNNorthwest1RegionID: "249157047649", + names.EUCentral1RegionID: "024640144536", + names.EUNorth1RegionID: "054986407534", + names.EUSouth1RegionID: "488287956546", + names.EUWest1RegionID: "245179582081", + names.EUWest2RegionID: "894491911112", + names.EUWest3RegionID: "807237891255", + names.ILCentral1RegionID: "406833011540", + names.MESouth1RegionID: "376037874950", + names.SAEast1RegionID: "424196993095", + names.USEast1RegionID: "663277389841", + names.USEast2RegionID: "415577184552", + names.USWest1RegionID: "926135532090", + names.USWest2RegionID: "174368400705", +} -var prebuiltECRImageIDByRegion_deepAR = map[string]string{ - endpoints.AfSouth1RegionID: "455444449433", - endpoints.ApEast1RegionID: "286214385809", - endpoints.ApNortheast1RegionID: "633353088612", - endpoints.ApNortheast2RegionID: "204372634319", - endpoints.ApSouth1RegionID: "991648021394", - endpoints.ApSoutheast1RegionID: "475088953585", - endpoints.ApSoutheast2RegionID: "514117268639", - endpoints.CaCentral1RegionID: "469771592824", - endpoints.CnNorth1RegionID: "390948362332", - endpoints.CnNorthwest1RegionID: "387376663083", - endpoints.EuCentral1RegionID: "495149712605", - endpoints.EuNorth1RegionID: "669576153137", - endpoints.EuSouth1RegionID: "257386234256", - endpoints.EuWest1RegionID: "224300973850", - endpoints.EuWest2RegionID: "644912444149", - endpoints.EuWest3RegionID: "749696950732", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "249704162688", - endpoints.SaEast1RegionID: "855470959533", - endpoints.UsEast1RegionID: "522234722520", - endpoints.UsEast2RegionID: "566113047672", - endpoints.UsGovWest1RegionID: "226302683700", - endpoints.UsWest1RegionID: "632365934929", - endpoints.UsWest2RegionID: "156387875391", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/debugger.json + +var PrebuiltECRImageIDByRegion_debugger = map[string]string{ + names.AFSouth1RegionID: "314341159256", + names.APEast1RegionID: "199566480951", + names.APNortheast1RegionID: "430734990657", + names.APNortheast2RegionID: "578805364391", + names.APNortheast3RegionID: "479947661362", + names.APSouth1RegionID: "904829902805", + names.APSoutheast1RegionID: "972752614525", + names.APSoutheast2RegionID: "184798709955", + names.CACentral1RegionID: "519511493484", + names.CNNorth1RegionID: "618459771430", + names.CNNorthwest1RegionID: "658757709296", + names.EUCentral1RegionID: "482524230118", + names.EUNorth1RegionID: "314864569078", + names.EUSouth1RegionID: "563282790590", + names.EUWest1RegionID: "929884845733", + names.EUWest2RegionID: "250201462417", + names.EUWest3RegionID: "447278800020", + names.MESouth1RegionID: "986000313247", + names.SAEast1RegionID: "818342061345", + names.USEast1RegionID: "503895931360", + names.USEast2RegionID: "915447279597", + names.USGovWest1RegionID: "515509971035", + names.USWest1RegionID: "685455198987", + names.USWest2RegionID: "895741380848", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/inferentia-mxnet.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/inferentia-pytorch.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/image-classification-neo.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/neo-mxnet.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/neo-pytorch.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/neo-tensorflow.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/xgboost-neo.json + +var PrebuiltECRImageIDByRegion_inferentiaNeo = map[string]string{ + names.AFSouth1RegionID: "774647643957", + names.APEast1RegionID: "110948597952", + names.APNortheast1RegionID: "941853720454", + names.APNortheast2RegionID: "151534178276", + names.APNortheast3RegionID: "925152966179", + names.APSouth1RegionID: "763008648453", + names.APSoutheast1RegionID: "324986816169", + names.APSoutheast2RegionID: "355873309152", + names.CACentral1RegionID: "464438896020", + names.CNNorth1RegionID: "472730292857", + names.CNNorthwest1RegionID: "474822919863", + names.EUCentral1RegionID: "746233611703", + names.EUNorth1RegionID: "601324751636", + names.EUSouth1RegionID: "966458181534", + names.EUWest1RegionID: "802834080501", + names.EUWest2RegionID: "205493899709", + names.EUWest3RegionID: "254080097072", + names.ILCentral1RegionID: "275950707576", + names.MESouth1RegionID: "836785723513", + names.SAEast1RegionID: "756306329178", + names.USEast1RegionID: "785573368785", + names.USEast2RegionID: "007439368137", + names.USGovWest1RegionID: "263933020539", + names.USISOEast1RegionID: "167761179201", + names.USISOBEast1RegionID: "406031935815", + names.USWest1RegionID: "710691900526", + names.USWest2RegionID: "301217895009", +} -var PrebuiltECRImageIDByRegion_factorMachines = map[string]string{ - endpoints.AfSouth1RegionID: "455444449433", - endpoints.ApEast1RegionID: "286214385809", - endpoints.ApNortheast1RegionID: "351501993468", - endpoints.ApNortheast2RegionID: "835164637446", - endpoints.ApNortheast3RegionID: "867004704886", - endpoints.ApSouth1RegionID: "991648021394", - endpoints.ApSoutheast1RegionID: "475088953585", - endpoints.ApSoutheast2RegionID: "712309505854", - endpoints.CaCentral1RegionID: "469771592824", - endpoints.CnNorth1RegionID: "390948362332", - endpoints.CnNorthwest1RegionID: "387376663083", - endpoints.EuCentral1RegionID: "664544806723", - endpoints.EuNorth1RegionID: "669576153137", - endpoints.EuSouth1RegionID: "257386234256", - endpoints.EuWest1RegionID: "438346466558", - endpoints.EuWest2RegionID: "644912444149", - endpoints.EuWest3RegionID: "749696950732", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "249704162688", - endpoints.SaEast1RegionID: "855470959533", - endpoints.UsEast1RegionID: "382416733822", - endpoints.UsEast2RegionID: "404615174143", - endpoints.UsGovWest1RegionID: "226302683700", - endpoints.UsWest1RegionID: "632365934929", - endpoints.UsWest2RegionID: "174872318107", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/chainer.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/pytorch.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/coach-mxnet.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/mxnet.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/coach-tensorflow.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/tensorflow.json + +var PrebuiltECRImageIDByRegion_SageMakerCustom = map[string]string{ // nosemgrep:ci.sagemaker-in-var-name + names.AFSouth1RegionID: "313743910680", + names.APEast1RegionID: "057415533634", + names.APNortheast1RegionID: "520713654638", + names.APNortheast2RegionID: "520713654638", + names.APSouth1RegionID: "520713654638", + names.APSoutheast1RegionID: "520713654638", + names.APSoutheast2RegionID: "520713654638", + names.CACentral1RegionID: "520713654638", + names.CNNorth1RegionID: "422961961927", + names.CNNorthwest1RegionID: "423003514399", + names.EUCentral1RegionID: "520713654638", + names.EUNorth1RegionID: "520713654638", + names.EUSouth1RegionID: "048378556238", + names.EUWest1RegionID: "520713654638", + names.EUWest2RegionID: "520713654638", + names.EUWest3RegionID: "520713654638", + names.MESouth1RegionID: "724002660598", + names.SAEast1RegionID: "520713654638", + names.USEast1RegionID: "520713654638", + names.USEast2RegionID: "520713654638", + names.USGovWest1RegionID: "246785580436", + names.USISOEast1RegionID: "744548109606", + names.USISOBEast1RegionID: "453391408702", + names.USWest1RegionID: "520713654638", + names.USWest2RegionID: "520713654638", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/ray-pytorch.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/coach-tensorflow.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/vw.json + +var PrebuiltECRImageIDByRegion_SageMakerRL = map[string]string{ // nosemgrep:ci.sagemaker-in-var-name + names.APNortheast1RegionID: "462105765813", + names.APNortheast2RegionID: "462105765813", + names.APSouth1RegionID: "462105765813", + names.APSoutheast1RegionID: "462105765813", + names.APSoutheast2RegionID: "462105765813", + names.CACentral1RegionID: "462105765813", + names.EUCentral1RegionID: "462105765813", + names.EUWest1RegionID: "462105765813", + names.EUWest2RegionID: "462105765813", + names.USEast1RegionID: "462105765813", + names.USEast2RegionID: "462105765813", + names.USWest1RegionID: "462105765813", + names.USWest2RegionID: "462105765813", +} -var prebuiltECRImageIDByRegion_lda = map[string]string{ - endpoints.ApNortheast1RegionID: "258307448986", - endpoints.ApNortheast2RegionID: "293181348795", - endpoints.ApSouth1RegionID: "991648021394", - endpoints.ApSoutheast1RegionID: "475088953585", - endpoints.ApSoutheast2RegionID: "297031611018", - endpoints.CaCentral1RegionID: "469771592824", - endpoints.EuCentral1RegionID: "353608530281", - endpoints.EuWest1RegionID: "999678624901", - endpoints.EuWest2RegionID: "644912444149", - endpoints.UsEast1RegionID: "766337827248", - endpoints.UsEast2RegionID: "999911452149", - endpoints.UsGovWest1RegionID: "226302683700", - endpoints.UsWest1RegionID: "632365934929", - endpoints.UsWest2RegionID: "266724342769", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/spark.json + +var PrebuiltECRImageIDByRegion_spark = map[string]string{ + names.AFSouth1RegionID: "309385258863", + names.APEast1RegionID: "732049463269", + names.APNortheast1RegionID: "411782140378", + names.APNortheast2RegionID: "860869212795", + names.APNortheast3RegionID: "102471314380", + names.APSouth1RegionID: "105495057255", + names.APSouth2RegionID: "873151114052", + names.APSoutheast1RegionID: "759080221371", + names.APSoutheast2RegionID: "440695851116", + names.APSoutheast3RegionID: "800295151634", + names.APSoutheast4RegionID: "819679513684", + names.CACentral1RegionID: "446299261295", + names.CAWest1RegionID: "000907499111", + names.CNNorth1RegionID: "671472414489", + names.CNNorthwest1RegionID: "844356804704", + names.EUCentral1RegionID: "906073651304", + names.EUCentral2RegionID: "142351485170", + names.EUNorth1RegionID: "330188676905", + names.EUSouth1RegionID: "753923664805", + names.EUSouth2RegionID: "833944533722", + names.EUWest1RegionID: "571004829621", + names.EUWest2RegionID: "836651553127", + names.EUWest3RegionID: "136845547031", + names.ILCentral1RegionID: "408426139102", + names.MECentral1RegionID: "395420993607", + names.MESouth1RegionID: "750251592176", + names.SAEast1RegionID: "737130764395", + names.USEast1RegionID: "173754725891", + names.USEast2RegionID: "314815235551", + names.USGovEast1RegionID: "260923028637", + names.USGovWest1RegionID: "271483468897", + names.USWest1RegionID: "667973535471", + names.USWest2RegionID: "153931337802", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/sagemaker-base-python.json + +var PrebuiltECRImageIDByRegion_SageMakerBasePython = map[string]string{ // nosemgrep:ci.sagemaker-in-var-name + names.AFSouth1RegionID: "559312083959", + names.APEast1RegionID: "493642496378", + names.APNortheast1RegionID: "102112518831", + names.APNortheast2RegionID: "806072073708", + names.APNortheast3RegionID: "792733760839", + names.APSouth1RegionID: "394103062818", + names.APSoutheast1RegionID: "492261229750", + names.APSoutheast2RegionID: "452832661640", + names.APSoutheast3RegionID: "276181064229", + names.CACentral1RegionID: "310906938811", + names.CNNorth1RegionID: "390048526115", + names.CNNorthwest1RegionID: "390780980154", + names.EUCentral1RegionID: "936697816551", + names.EUNorth1RegionID: "243637512696", + names.EUSouth1RegionID: "592751261982", + names.EUSouth2RegionID: "127363102723", + names.EUWest1RegionID: "470317259841", + names.EUWest2RegionID: "712779665605", + names.EUWest3RegionID: "615547856133", + names.ILCentral1RegionID: "380164790875", + names.MECentral1RegionID: "103105715889", + names.MESouth1RegionID: "117516905037", + names.SAEast1RegionID: "782484402741", + names.USEast1RegionID: "081325390199", + names.USEast2RegionID: "429704687514", + names.USGovEast1RegionID: "107072934176", + names.USGovWest1RegionID: "107173498710", + names.USWest1RegionID: "742091327244", + names.USWest2RegionID: "236514542706", +} + +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/sagemaker-geospatial.json -var prebuiltECRImageIDByRegion_xgBoost = map[string]string{ - endpoints.AfSouth1RegionID: "510948584623", - endpoints.ApEast1RegionID: "651117190479", - endpoints.ApNortheast1RegionID: "354813040037", - endpoints.ApNortheast2RegionID: "366743142698", - endpoints.ApNortheast3RegionID: "867004704886", - endpoints.ApSouth1RegionID: "720646828776", - endpoints.ApSoutheast1RegionID: "121021644041", - endpoints.ApSoutheast2RegionID: "783357654285", - endpoints.CaCentral1RegionID: "341280168497", - endpoints.CnNorth1RegionID: "450853457545", - endpoints.CnNorthwest1RegionID: "451049120500", - endpoints.EuCentral1RegionID: "492215442770", - endpoints.EuNorth1RegionID: "662702820516", - endpoints.EuSouth1RegionID: "978288397137", - endpoints.EuWest1RegionID: "141502667606", - endpoints.EuWest2RegionID: "764974769150", - endpoints.EuWest3RegionID: "659782779980", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "801668240914", - endpoints.SaEast1RegionID: "737474898029", - endpoints.UsEast1RegionID: "683313688378", - endpoints.UsEast2RegionID: "257758044811", - endpoints.UsGovWest1RegionID: "414596584902", - endpoints.UsWest1RegionID: "746614075791", - endpoints.UsWest2RegionID: "246618743249", +var PrebuiltECRImageIDByRegion_SageMakerGeospatial = map[string]string{ // nosemgrep:ci.sagemaker-in-var-name + names.USWest2RegionID: "081189585635", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html -// https://docs.aws.amazon.com/sagemaker/latest/dg/pre-built-docker-containers-scikit-learn-spark.html - -var PrebuiltECRImageIDByRegion_sparkML = map[string]string{ - endpoints.AfSouth1RegionID: "510948584623", - endpoints.ApEast1RegionID: "651117190479", - endpoints.ApNortheast1RegionID: "354813040037", - endpoints.ApNortheast2RegionID: "366743142698", - endpoints.ApSouth1RegionID: "720646828776", - endpoints.ApSoutheast1RegionID: "121021644041", - endpoints.ApSoutheast2RegionID: "783357654285", - endpoints.CaCentral1RegionID: "341280168497", - endpoints.CnNorth1RegionID: "450853457545", - endpoints.CnNorthwest1RegionID: "451049120500", - endpoints.EuCentral1RegionID: "492215442770", - endpoints.EuNorth1RegionID: "662702820516", - endpoints.EuSouth1RegionID: "978288397137", - endpoints.EuWest1RegionID: "141502667606", - endpoints.EuWest2RegionID: "764974769150", - endpoints.EuWest3RegionID: "659782779980", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "801668240914", - endpoints.SaEast1RegionID: "737474898029", - endpoints.UsEast1RegionID: "683313688378", - endpoints.UsEast2RegionID: "257758044811", - endpoints.UsGovWest1RegionID: "414596584902", - endpoints.UsWest1RegionID: "746614075791", - endpoints.UsWest2RegionID: "246618743249", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/forecasting-deepar.json + +var PrebuiltECRImageIDByRegion_deepAR = map[string]string{ + names.AFSouth1RegionID: "455444449433", + names.APEast1RegionID: "286214385809", + names.APNortheast1RegionID: "633353088612", + names.APNortheast2RegionID: "204372634319", + names.APNortheast3RegionID: "867004704886", + names.APSouth1RegionID: "991648021394", + names.APSouth2RegionID: "628508329040", + names.APSoutheast1RegionID: "475088953585", + names.APSoutheast2RegionID: "514117268639", + names.APSoutheast3RegionID: "951798379941", + names.APSoutheast4RegionID: "106583098589", + names.CACentral1RegionID: "469771592824", + names.CAWest1RegionID: "190319476487", + names.CNNorth1RegionID: "390948362332", + names.CNNorthwest1RegionID: "387376663083", + names.EUCentral1RegionID: "495149712605", + names.EUCentral2RegionID: "680994064768", + names.EUNorth1RegionID: "669576153137", + names.EUSouth1RegionID: "257386234256", + names.EUSouth2RegionID: "104374241257", + names.EUWest1RegionID: "224300973850", + names.EUWest2RegionID: "644912444149", + names.EUWest3RegionID: "749696950732", + names.ILCentral1RegionID: "898809789911", + names.MECentral1RegionID: "272398656194", + names.MESouth1RegionID: "249704162688", + names.SAEast1RegionID: "855470959533", + names.USEast1RegionID: "522234722520", + names.USEast2RegionID: "566113047672", + names.USGovEast1RegionID: "237065988967", + names.USGovWest1RegionID: "226302683700", + names.USISOEast1RegionID: "490574956308", + names.USISOBEast1RegionID: "765400339828", + names.USWest1RegionID: "632365934929", + names.USWest2RegionID: "156387875391", } -// https://github.com/aws/deep-learning-containers/blob/master/available_images.md -// https://github.com/aws/sagemaker-tensorflow-serving-container +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/factorization-machines.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/ipinsights.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/linear-learner.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/ntm.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/object2vec.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/pca.json -var prebuiltECRImageIDByRegion_deepLearning = map[string]string{ - endpoints.AfSouth1RegionID: "626614931356", - endpoints.ApEast1RegionID: "871362719292", - endpoints.ApNortheast1RegionID: "763104351884", - endpoints.ApNortheast2RegionID: "763104351884", - endpoints.ApSouth1RegionID: "763104351884", - endpoints.ApSoutheast1RegionID: "763104351884", - endpoints.ApSoutheast2RegionID: "763104351884", - endpoints.CaCentral1RegionID: "763104351884", - endpoints.CnNorth1RegionID: "727897471807", - endpoints.CnNorthwest1RegionID: "727897471807", - endpoints.EuCentral1RegionID: "763104351884", - endpoints.EuNorth1RegionID: "763104351884", - endpoints.EuWest1RegionID: "763104351884", - endpoints.EuWest2RegionID: "763104351884", - endpoints.EuWest3RegionID: "763104351884", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "217643126080", - endpoints.SaEast1RegionID: "763104351884", - endpoints.UsEast1RegionID: "763104351884", - endpoints.UsEast2RegionID: "763104351884", - endpoints.UsIsoEast1RegionID: "886529160074", - endpoints.UsWest1RegionID: "763104351884", - endpoints.UsWest2RegionID: "763104351884", +var PrebuiltECRImageIDByRegion_factorMachines = map[string]string{ + names.AFSouth1RegionID: "455444449433", + names.APEast1RegionID: "286214385809", + names.APNortheast1RegionID: "351501993468", + names.APNortheast2RegionID: "835164637446", + names.APNortheast3RegionID: "867004704886", + names.APSouth1RegionID: "991648021394", + names.APSouth2RegionID: "628508329040", + names.APSoutheast1RegionID: "475088953585", + names.APSoutheast2RegionID: "712309505854", + names.APSoutheast3RegionID: "951798379941", + names.APSoutheast4RegionID: "106583098589", + names.CACentral1RegionID: "469771592824", + names.CAWest1RegionID: "190319476487", + names.CNNorth1RegionID: "390948362332", + names.CNNorthwest1RegionID: "387376663083", + names.EUCentral1RegionID: "664544806723", + names.EUCentral2RegionID: "680994064768", + names.EUNorth1RegionID: "669576153137", + names.EUSouth1RegionID: "257386234256", + names.EUSouth2RegionID: "104374241257", + names.EUWest1RegionID: "438346466558", + names.EUWest2RegionID: "644912444149", + names.EUWest3RegionID: "749696950732", + names.ILCentral1RegionID: "898809789911", + names.MECentral1RegionID: "272398656194", + names.MESouth1RegionID: "249704162688", + names.SAEast1RegionID: "855470959533", + names.USEast1RegionID: "382416733822", + names.USEast2RegionID: "404615174143", + names.USGovEast1RegionID: "237065988967", + names.USGovWest1RegionID: "226302683700", + names.USISOEast1RegionID: "490574956308", + names.USISOBEast1RegionID: "765400339828", + names.USWest1RegionID: "632365934929", + names.USWest2RegionID: "174872318107", } -// https://github.com/aws/sagemaker-tensorflow-serving-container +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/lda.json + +var PrebuiltECRImageIDByRegion_lda = map[string]string{ + names.APNortheast1RegionID: "258307448986", + names.APNortheast2RegionID: "293181348795", + names.APSouth1RegionID: "991648021394", + names.APSoutheast1RegionID: "475088953585", + names.APSoutheast2RegionID: "297031611018", + names.CACentral1RegionID: "469771592824", + names.EUCentral1RegionID: "353608530281", + names.EUWest1RegionID: "999678624901", + names.EUWest2RegionID: "644912444149", + names.USEast1RegionID: "766337827248", + names.USEast2RegionID: "999911452149", + names.USGovWest1RegionID: "226302683700", + names.USISOEast1RegionID: "490574956308", + names.USISOBEast1RegionID: "765400339828", + names.USWest1RegionID: "632365934929", + names.USWest2RegionID: "266724342769", +} -var prebuiltECRImageIDByRegion_tensorFlowServing = map[string]string{ - endpoints.ApEast1RegionID: "057415533634", - endpoints.ApNortheast1RegionID: "520713654638", - endpoints.ApNortheast2RegionID: "520713654638", - endpoints.ApSouth1RegionID: "520713654638", - endpoints.ApSoutheast1RegionID: "520713654638", - endpoints.ApSoutheast2RegionID: "520713654638", - endpoints.CaCentral1RegionID: "520713654638", - endpoints.CnNorth1RegionID: "520713654638", - endpoints.CnNorthwest1RegionID: "520713654638", - endpoints.EuCentral1RegionID: "520713654638", - endpoints.EuNorth1RegionID: "520713654638", - endpoints.EuWest1RegionID: "520713654638", - endpoints.EuWest2RegionID: "520713654638", - endpoints.EuWest3RegionID: "520713654638", - // endpoints.MeCentral1RegionID: "", - endpoints.MeSouth1RegionID: "724002660598", - endpoints.SaEast1RegionID: "520713654638", - endpoints.UsEast1RegionID: "520713654638", - endpoints.UsEast2RegionID: "520713654638", - endpoints.UsWest1RegionID: "520713654638", - endpoints.UsWest2RegionID: "520713654638", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/xgboost.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/huggingface-tei.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/huggingface-tei-cpu.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/sparkml-serving.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/sklearn.json + +var PrebuiltECRImageIDByRegion_XGBoost = map[string]string{ + names.AFSouth1RegionID: "510948584623", + names.APEast1RegionID: "651117190479", + names.APNortheast1RegionID: "354813040037", + names.APNortheast2RegionID: "366743142698", + names.APNortheast3RegionID: "867004704886", + names.APSouth1RegionID: "720646828776", + names.APSouth2RegionID: "628508329040", + names.APSoutheast1RegionID: "121021644041", + names.APSoutheast2RegionID: "783357654285", + names.APSoutheast3RegionID: "951798379941", + names.APSoutheast4RegionID: "106583098589", + names.CACentral1RegionID: "341280168497", + names.CAWest1RegionID: "190319476487", + names.CNNorth1RegionID: "450853457545", + names.CNNorthwest1RegionID: "451049120500", + names.EUCentral1RegionID: "492215442770", + names.EUCentral2RegionID: "680994064768", + names.EUNorth1RegionID: "662702820516", + names.EUSouth1RegionID: "978288397137", + names.EUSouth2RegionID: "104374241257", + names.EUWest1RegionID: "141502667606", + names.EUWest2RegionID: "764974769150", + names.EUWest3RegionID: "659782779980", + names.ILCentral1RegionID: "898809789911", + names.MECentral1RegionID: "272398656194", + names.MESouth1RegionID: "801668240914", + names.SAEast1RegionID: "737474898029", + names.USEast1RegionID: "683313688378", + names.USEast2RegionID: "257758044811", + names.USGovEast1RegionID: "237065988967", + names.USGovWest1RegionID: "414596584902", + names.USISOEast1RegionID: "833128469047", + names.USISOBEast1RegionID: "281123927165", + names.USWest1RegionID: "746614075791", + names.USWest2RegionID: "246618743249", +} + +// https://github.com/aws/deep-learning-containers/blob/master/available_images.md +// https://github.com/aws/sagemaker-tensorflow-serving-container +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/autogluon.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/djl-deepspeed.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/djl-fastertransformer.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/djl-lmi.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/djl-neuronx.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/djl-tensorrtllm.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/pytorch.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/stabilityai.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/sagemaker-tritonserver.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/tensorflow.json +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/huggingface-llm.json + +var PrebuiltECRImageIDByRegion_deepLearning = map[string]string{ + names.AFSouth1RegionID: "626614931356", + names.APEast1RegionID: "871362719292", + names.APNortheast1RegionID: "763104351884", + names.APNortheast2RegionID: "763104351884", + names.APNortheast3RegionID: "364406365360", + names.APSouth1RegionID: "763104351884", + names.APSouth2RegionID: "772153158452", + names.APSoutheast1RegionID: "763104351884", + names.APSoutheast2RegionID: "763104351884", + names.APSoutheast3RegionID: "907027046896", + names.APSoutheast4RegionID: "457447274322", + names.CACentral1RegionID: "763104351884", + names.CAWest1RegionID: "204538143572", + names.CNNorth1RegionID: "727897471807", + names.CNNorthwest1RegionID: "727897471807", + names.EUCentral1RegionID: "763104351884", + names.EUCentral2RegionID: "380420809688", + names.EUNorth1RegionID: "763104351884", + names.EUWest1RegionID: "763104351884", + names.EUWest2RegionID: "763104351884", + names.EUWest3RegionID: "763104351884", + names.EUSouth1RegionID: "692866216735", + names.EUSouth2RegionID: "503227376785", + names.ILCentral1RegionID: "780543022126", + names.MECentral1RegionID: "914824155844", + names.MESouth1RegionID: "217643126080", + names.SAEast1RegionID: "763104351884", + names.USEast1RegionID: "763104351884", + names.USEast2RegionID: "763104351884", + names.USWest1RegionID: "763104351884", + names.USWest2RegionID: "763104351884", + names.USGovEast1RegionID: "446045086412", + names.USGovWest1RegionID: "442386744353", + names.USISOEast1RegionID: "886529160074", + names.USISOBEast1RegionID: "094389454867", } -// https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-pre-built-container.html -var prebuiltECRImageIDByRegion_modelMonitor = map[string]string{ - endpoints.AfSouth1RegionID: "875698925577", - endpoints.ApEast1RegionID: "001633400207", - endpoints.ApNortheast1RegionID: "574779866223", - endpoints.ApNortheast2RegionID: "709848358524", - endpoints.ApNortheast3RegionID: "990339680094", - endpoints.ApSouth1RegionID: "126357580389", - endpoints.ApSoutheast1RegionID: "245545462676", - endpoints.ApSoutheast2RegionID: "563025443158", - endpoints.ApSoutheast3RegionID: "669540362728", - endpoints.CaCentral1RegionID: "536280801234", - endpoints.CnNorth1RegionID: "453000072557", - endpoints.CnNorthwest1RegionID: "453252182341", - endpoints.EuCentral1RegionID: "048819808253", - endpoints.EuNorth1RegionID: "895015795356", - endpoints.EuSouth1RegionID: "933208885752", - endpoints.EuWest1RegionID: "468650794304", - endpoints.EuWest2RegionID: "749857270468", - endpoints.EuWest3RegionID: "680080141114", - endpoints.MeSouth1RegionID: "607024016150", - endpoints.SaEast1RegionID: "539772159869", - endpoints.UsEast1RegionID: "156813124566", - endpoints.UsEast2RegionID: "777275614652", - endpoints.UsGovWest1RegionID: "362178532790", - endpoints.UsWest1RegionID: "890145073186", - endpoints.UsWest2RegionID: "159807026194", +// https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/image_uri_config/model-monitor.json + +var PrebuiltECRImageIDByRegion_modelMonitor = map[string]string{ + names.AFSouth1RegionID: "875698925577", + names.APEast1RegionID: "001633400207", + names.APNortheast1RegionID: "574779866223", + names.APNortheast2RegionID: "709848358524", + names.APNortheast3RegionID: "990339680094", + names.APSouth1RegionID: "126357580389", + names.APSoutheast1RegionID: "245545462676", + names.APSoutheast2RegionID: "563025443158", + names.APSoutheast3RegionID: "669540362728", + names.CACentral1RegionID: "536280801234", + names.CNNorth1RegionID: "453000072557", + names.CNNorthwest1RegionID: "453252182341", + names.EUCentral1RegionID: "048819808253", + names.EUNorth1RegionID: "895015795356", + names.EUSouth1RegionID: "933208885752", + names.EUSouth2RegionID: "437450045455", + names.EUWest1RegionID: "468650794304", + names.EUWest2RegionID: "749857270468", + names.EUWest3RegionID: "680080141114", + names.ILCentral1RegionID: "843974653677", + names.MECentral1RegionID: "588750061953", + names.MESouth1RegionID: "607024016150", + names.SAEast1RegionID: "539772159869", + names.USEast1RegionID: "156813124566", + names.USEast2RegionID: "777275614652", + names.USWest1RegionID: "890145073186", + names.USWest2RegionID: "159807026194", } // @SDKDataSource("aws_sagemaker_prebuilt_ecr_image") @@ -350,41 +727,87 @@ func DataSourcePrebuiltECRImage() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ - repositoryBlazingText, - repositoryDeepARForecasting, - repositoryFactorizationMachines, - repositoryImageClassification, - repositoryIPInsights, - repositoryKMeans, - repositoryKNearestNeighbor, - repositoryLDA, - repositoryLinearLearner, - repositoryModelMonitor, - repositoryMXNetInference, - repositoryMXNetInferenceEIA, - repositoryMXNetTraining, - repositoryNeuralTopicModel, - repositoryObject2Vec, - repositoryObjectDetection, - repositoryPCA, - repositoryPyTorchInference, - repositoryPyTorchInferenceEIA, - repositoryPyTorchTraining, - repositoryRandomCutForest, - repositoryScikitLearn, - repositorySemanticSegmentation, - repositorySeq2Seq, - repositorySparkML, - repositoryTensorFlowInference, - repositoryTensorFlowInferenceEIA, - repositoryTensorFlowServing, - repositoryTensorFlowServingEIA, - repositoryTensorFlowTraining, - repositoryHuggingFaceTensorFlowTraining, - repositoryHuggingFaceTensorFlowInference, - repositoryHuggingFacePyTorchTraining, - repositoryHuggingFacePyTorchInference, - repositoryXGBoost, + RepositoryAutoGluonTraining, + RepositoryAutoGluonInference, + RepositoryBlazingText, + RepositoryChainer, + RepositoryClarify, + RepositoryDJLDeepSpeed, + RepositoryDataWrangler, + RepositoryDebugger, + RepositoryDeepARForecasting, + RepositoryFactorizationMachines, + RepositoryHuggingFaceTensorFlowTraining, + RepositoryHuggingFacePyTorchTraining, + RepositoryHuggingFacePyTorchTrainingNeuronX, + RepositoryHuggingFacePyTorchTrainingCompiler, + RepositoryHuggingFaceTensorFlowTrainingCompiler, + RepositoryHuggingFaceTensorFlowInference, + RepositoryHuggingFacePyTorchInference, + RepositoryHuggingFacePyTorchInferenceNeuron, + RepositoryHuggingFacePyTorchInferenceNeuronX, + RepositoryHuggingFacePyTorchTGIInference, + RepositoryHuggingFaceTEI, + RepositoryHuggingFaceTEICPU, + RepositoryIPInsights, + RepositoryImageClassification, + RepositoryInferentiaMXNet, + RepositoryInferentiaPyTorch, + RepositoryKMeans, + RepositoryKNearestNeighbor, + RepositoryLDA, + RepositoryLinearLearner, + RepositoryModelMonitor, + RepositoryMXNetTraining, + RepositoryMXNetInference, + RepositoryMXNetInferenceEIA, + RepositoryMXNetCoach, + RepositoryNeuralTopicModel, + RepositoryNeoImageClassification, + RepositoryNeoMXNet, + RepositoryNeoPyTorch, + RepositoryNeoTensorflow, + RepositoryNeoXGBoost, + RepositoryNVIDIATritonInference, + RepositoryObjectDetection, + RepositoryObject2Vec, + RepositoryPCA, + RepositoryPyTorchTraining, + RepositoryPyTorchTrainingNeuronX, + RepositoryPyTorchTrainingCompiler, + RepositoryPyTorchInference, + RepositoryPyTorchInferenceEIA, + RepositoryPyTorchInferenceGraviton, + RepositoryPyTorchInferenceNeuronX, + RepositoryRandomCutForest, + RepositoryRLRayPyTorch, + RepositoryRLCoachPyTorch, + RepositorySageMakerBasePython, + RepositorySageMakerGeospatial, + RepositorySageMakerMXNet, + RepositorySageMakerMXNetServing, + RepositorySageMakerMXNetEIA, + RepositorySageMakerMXNetServingEIA, + RepositorySageMakerPyTorch, + RepositorySageMakerTensorFlow, + RepositorySageMakerTensorFlowEIA, + RepositoryScikitLearn, + RepositorySemanticSegmentation, + RepositorySeq2Seq, + RepositorySpark, + RepositorySparkML, + RepositoryTensorFlowTraining, + RepositoryTensorFlowInference, + RepositoryTensorFlowInferenceEIA, + RepositoryTensorFlowInferenceGraviton, + RepositoryTensorFlowServing, + RepositoryTensorFlowServingEIA, + RepositorySageMakerTensorFlowScriptMode, + RepositoryTensorflowCoach, + RepositoryTensorflowInferentia, + RepositoryStabilityAI, + RepositoryVW, + RepositoryXGBoost, }, false), }, @@ -433,38 +856,93 @@ func dataSourcePrebuiltECRImageRead(ctx context.Context, d *schema.ResourceData, id := "" switch repo { - case repositoryBlazingText, - repositoryImageClassification, - repositoryObjectDetection, - repositorySemanticSegmentation, - repositorySeq2Seq: - id = prebuiltECRImageIDByRegion_blazing[region] - case repositoryDeepARForecasting: - id = prebuiltECRImageIDByRegion_deepAR[region] - case repositoryLDA: - id = prebuiltECRImageIDByRegion_lda[region] - case repositoryModelMonitor: - id = prebuiltECRImageIDByRegion_modelMonitor[region] - case repositoryXGBoost: - id = prebuiltECRImageIDByRegion_xgBoost[region] - case repositoryScikitLearn, repositorySparkML: - id = PrebuiltECRImageIDByRegion_sparkML[region] - case repositoryTensorFlowServing, repositoryTensorFlowServingEIA: - id = prebuiltECRImageIDByRegion_tensorFlowServing[region] - case repositoryMXNetInference, - repositoryMXNetInferenceEIA, - repositoryMXNetTraining, - repositoryPyTorchInference, - repositoryPyTorchInferenceEIA, - repositoryPyTorchTraining, - repositoryTensorFlowInference, - repositoryTensorFlowInferenceEIA, - repositoryTensorFlowTraining, - repositoryHuggingFaceTensorFlowTraining, - repositoryHuggingFaceTensorFlowInference, - repositoryHuggingFacePyTorchTraining, - repositoryHuggingFacePyTorchInference: - id = prebuiltECRImageIDByRegion_deepLearning[region] + case RepositoryBlazingText, + RepositoryImageClassification, + RepositoryObjectDetection, + RepositorySemanticSegmentation, + RepositorySeq2Seq: + id = PrebuiltECRImageIDByRegion_blazing[region] + case RepositoryClarify: + id = PrebuiltECRImageIDByRegion_clarify[region] + case RepositoryDataWrangler: + id = PrebuiltECRImageIDByRegion_dataWrangler[region] + case RepositoryDebugger: + id = PrebuiltECRImageIDByRegion_debugger[region] + case RepositoryDeepARForecasting: + id = PrebuiltECRImageIDByRegion_deepAR[region] + case RepositoryInferentiaMXNet, + RepositoryInferentiaPyTorch, + RepositoryMXNetCoach, + RepositoryNeoImageClassification, + RepositoryNeoMXNet, + RepositoryNeoPyTorch, + RepositoryNeoTensorflow, + RepositoryNeoXGBoost, + RepositoryTensorflowInferentia: + id = PrebuiltECRImageIDByRegion_inferentiaNeo[region] + case RepositoryLDA: + id = PrebuiltECRImageIDByRegion_lda[region] + case RepositoryModelMonitor: + id = PrebuiltECRImageIDByRegion_modelMonitor[region] + case RepositoryXGBoost, + RepositoryScikitLearn, + RepositorySparkML, + RepositoryHuggingFaceTEI, + RepositoryHuggingFaceTEICPU: + id = PrebuiltECRImageIDByRegion_XGBoost[region] + case RepositoryChainer, + RepositorySageMakerMXNet, + RepositorySageMakerMXNetServing, + RepositorySageMakerMXNetEIA, + RepositorySageMakerMXNetServingEIA, + RepositorySageMakerPyTorch, + RepositorySageMakerTensorFlow, + RepositorySageMakerTensorFlowEIA, + RepositorySageMakerTensorFlowScriptMode, + RepositoryTensorflowCoach, + RepositoryTensorFlowServing, + RepositoryTensorFlowServingEIA: + id = PrebuiltECRImageIDByRegion_SageMakerCustom[region] + case RepositoryAutoGluonTraining, + RepositoryAutoGluonInference, + RepositoryDJLDeepSpeed, + RepositoryHuggingFaceTensorFlowTraining, + RepositoryHuggingFacePyTorchTraining, + RepositoryHuggingFacePyTorchTrainingNeuronX, + RepositoryHuggingFacePyTorchTrainingCompiler, + RepositoryHuggingFaceTensorFlowTrainingCompiler, + RepositoryHuggingFaceTensorFlowInference, + RepositoryHuggingFacePyTorchInference, + RepositoryHuggingFacePyTorchInferenceNeuron, + RepositoryHuggingFacePyTorchInferenceNeuronX, + RepositoryHuggingFacePyTorchTGIInference, + RepositoryMXNetTraining, + RepositoryMXNetInference, + RepositoryMXNetInferenceEIA, + RepositoryPyTorchTraining, + RepositoryPyTorchTrainingNeuronX, + RepositoryPyTorchTrainingCompiler, + RepositoryPyTorchInference, + RepositoryPyTorchInferenceEIA, + RepositoryPyTorchInferenceGraviton, + RepositoryPyTorchInferenceNeuronX, + RepositoryStabilityAI, + RepositoryTensorFlowTraining, + RepositoryTensorFlowInference, + RepositoryTensorFlowInferenceEIA, + RepositoryTensorFlowInferenceGraviton, + RepositoryNVIDIATritonInference: + id = PrebuiltECRImageIDByRegion_deepLearning[region] + case RepositoryRLRayPyTorch, + RepositoryRLCoachPyTorch, + RepositoryVW: + id = PrebuiltECRImageIDByRegion_SageMakerRL[region] + case RepositorySageMakerBasePython: + id = PrebuiltECRImageIDByRegion_SageMakerBasePython[region] + case RepositorySageMakerGeospatial: + id = PrebuiltECRImageIDByRegion_SageMakerGeospatial[region] + case RepositorySpark: + id = PrebuiltECRImageIDByRegion_spark[region] default: id = PrebuiltECRImageIDByRegion_factorMachines[region] } diff --git a/internal/service/sagemaker/prebuilt_ecr_image_data_source_test.go b/internal/service/sagemaker/prebuilt_ecr_image_data_source_test.go index 373bd10b413..b5186549196 100644 --- a/internal/service/sagemaker/prebuilt_ecr_image_data_source_test.go +++ b/internal/service/sagemaker/prebuilt_ecr_image_data_source_test.go @@ -4,6 +4,7 @@ package sagemaker_test import ( + "fmt" "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -24,7 +25,7 @@ func TestAccSageMakerPrebuiltECRImageDataSource_basic(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccPrebuiltECRImageDataSourceConfig_basic, + Config: testAccPrebuiltECRImageDataSourceConfig_basic("kmeans"), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), @@ -37,7 +38,7 @@ func TestAccSageMakerPrebuiltECRImageDataSource_basic(t *testing.T) { func TestAccSageMakerPrebuiltECRImageDataSource_region(t *testing.T) { ctx := acctest.Context(t) - expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_sparkML[acctest.Region()] + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_XGBoost[acctest.Region()] dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" @@ -47,7 +48,7 @@ func TestAccSageMakerPrebuiltECRImageDataSource_region(t *testing.T) { ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, Steps: []resource.TestStep{ { - Config: testAccPrebuiltECRImageDataSourceConfig_explicitRegion, + Config: testAccPrebuiltECRImageDataSourceConfig_explicitRegion("sagemaker-scikit-learn", "2.2-1.0.11.0"), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), @@ -58,18 +59,390 @@ func TestAccSageMakerPrebuiltECRImageDataSource_region(t *testing.T) { }) } -const testAccPrebuiltECRImageDataSourceConfig_basic = ` +func TestAccSageMakerPrebuiltECRImageDataSource_caseClarify(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_clarify[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-clarify-processing"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-clarify-processing", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseDataWrangler(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_dataWrangler[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-data-wrangler-container"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-data-wrangler-container", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseDebugger(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_debugger[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-debugger-rules"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-debugger-rules", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseInferentiaNeoInferentiaPyTorch(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_inferentiaNeo[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-neo-pytorch"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-neo-pytorch", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseInferentiaNeoTensorflowInferentia(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_inferentiaNeo[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-neo-tensorflow"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-neo-tensorflow", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseXGBoostSparkML(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_XGBoost[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-sparkml-serving"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-sparkml-serving", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseXGBoostHuggingFaceTEICPU(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_XGBoost[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("tei-cpu"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "tei-cpu", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSageMakerCustomSageMakerChainer(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_SageMakerCustom[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-chainer"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-chainer", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSageMakerCustomSageMakerMXNetServingEIA(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_SageMakerCustom[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-mxnet-serving-eia"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-mxnet-serving-eia", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSageMakerCustomSageMakerTensorFlowEIA(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_SageMakerCustom[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-tensorflow-eia"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-tensorflow-eia", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseDeepLearningHuggingFacePyTorchTGIInference(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_deepLearning[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("huggingface-pytorch-tgi-inference"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "huggingface-pytorch-tgi-inference", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseDeepLearningNVIDIATritionInference(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_deepLearning[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-tritonserver"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-tritonserver", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseDeepLearningStabilityAI(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_deepLearning[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("stabilityai-pytorch-inference"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "stabilityai-pytorch-inference", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSageMakerBasePython(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_SageMakerBasePython[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-base-python"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-base-python", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSageMakerRL(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_SageMakerRL[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-rl-ray-container"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-rl-ray-container", acctest.Ct1)), + ), + }, + }, + }) +} + +func TestAccSageMakerPrebuiltECRImageDataSource_caseSpark(t *testing.T) { + ctx := acctest.Context(t) + expectedID := tfsagemaker.PrebuiltECRImageIDByRegion_spark[acctest.Region()] + + dataSourceName := "data.aws_sagemaker_prebuilt_ecr_image.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { acctest.PreCheck(ctx, t) }, + ErrorCheck: acctest.ErrorCheck(t, names.SageMakerServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + Steps: []resource.TestStep{ + { + Config: testAccPrebuiltECRImageDataSourceConfig_basic("sagemaker-spark-processing"), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr(dataSourceName, names.AttrID, expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_id", expectedID), + resource.TestCheckResourceAttr(dataSourceName, "registry_path", tfsagemaker.PrebuiltECRImageCreatePath(expectedID, acctest.Region(), acctest.PartitionDNSSuffix(), "sagemaker-spark-processing", acctest.Ct1)), + ), + }, + }, + }) +} + +func testAccPrebuiltECRImageDataSourceConfig_basic(repository_name string) string { + return acctest.ConfigCompose(fmt.Sprintf(` data "aws_sagemaker_prebuilt_ecr_image" "test" { - repository_name = "kmeans" + repository_name = %[1]q +} +`, repository_name)) } -` -const testAccPrebuiltECRImageDataSourceConfig_explicitRegion = ` +func testAccPrebuiltECRImageDataSourceConfig_explicitRegion(repository_name string, image_tag string) string { + return acctest.ConfigCompose(fmt.Sprintf(` data "aws_region" "current" {} data "aws_sagemaker_prebuilt_ecr_image" "test" { - repository_name = "sagemaker-scikit-learn" - image_tag = "2.2-1.0.11.0" + repository_name = %[1]q + image_tag = %[2]q region = data.aws_region.current.name } -` +`, repository_name, image_tag)) +} diff --git a/website/docs/d/sagemaker_prebuilt_ecr_image.html.markdown b/website/docs/d/sagemaker_prebuilt_ecr_image.html.markdown index 8256cd3a1f9..0b22cc02c3e 100644 --- a/website/docs/d/sagemaker_prebuilt_ecr_image.html.markdown +++ b/website/docs/d/sagemaker_prebuilt_ecr_image.html.markdown @@ -27,7 +27,7 @@ data "aws_sagemaker_prebuilt_ecr_image" "test" { This data source supports the following arguments: -* `repository_name` - (Required) Name of the repository, which is generally the algorithm or library. Values include `blazingtext`, `factorization-machines`, `forecasting-deepar`, `image-classification`, `ipinsights`, `kmeans`, `knn`, `lda`, `linear-learner`, `mxnet-inference-eia`, `mxnet-inference`, `mxnet-training`, `ntm`, `object-detection`, `object2vec`, `pca`, `pytorch-inference-eia`, `pytorch-inference`, `pytorch-training`, `randomcutforest`, `sagemaker-scikit-learn`, `sagemaker-sparkml-serving`, `sagemaker-xgboost`, `semantic-segmentation`, `seq2seq`, `tensorflow-inference-eia`, `tensorflow-inference`, `tensorflow-training`, `huggingface-tensorflow-training`, `huggingface-tensorflow-inference`, `huggingface-pytorch-training`, and `huggingface-pytorch-inference`. +* `repository_name` - (Required) Name of the repository, which is generally the algorithm or library. Values include `autogluon-inference`, `autogluon-training`, `blazingtext`, `djl-inference`, `factorization-machines`, `forecasting-deepar`, `huggingface-pytorch-inference`, `huggingface-pytorch-inference-neuron`, `huggingface-pytorch-inference-neuronx`, `huggingface-pytorch-tgi-inference`, `huggingface-pytorch-training`, `huggingface-pytorch-training-neuronx`, `huggingface-pytorch-trcomp-training`, `huggingface-tensorflow-inference`, `huggingface-tensorflow-training`, `huggingface-tensorflow-trcomp-training`, `image-classification`, `image-classification-neo`, `ipinsights`, `kmeans`, `knn`, `lda`, `linear-learner`, `mxnet-inference`, `mxnet-inference-eia`, `mxnet-training`, `ntm`, `object-detection`, `object2vec`, `pca`, `pytorch-inference`, `pytorch-inference-eia`, `pytorch-inference-graviton`, `pytorch-inference-neuronx`, `pytorch-training`, `pytorch-training-neuronx`, `pytorch-trcomp-training`, `randomcutforest`, `sagemaker-base-python`, `sagemaker-chainer`, `sagemaker-clarify-processing`, `sagemaker-data-wrangler-container`, `sagemaker-debugger-rules`, `sagemaker-geospatial-v1-0`, `sagemaker-inference-mxnet`, `sagemaker-inference-pytorch`, `sagemaker-inference-tensorflow`, `sagemaker-model-monitor-analyzer`, `sagemaker-mxnet`, `sagemaker-mxnet-eia`, `sagemaker-mxnet-serving`, `sagemaker-mxnet-serving-eia`, `sagemaker-neo-mxnet`, `sagemaker-neo-pytorch`, `sagemaker-neo-tensorflow`, `sagemaker-pytorch`, `sagemaker-rl-coach-container`, `sagemaker-rl-mxnet`, `sagemaker-rl-ray-container`, `sagemaker-rl-tensorflow`, `sagemaker-rl-vw-container`, `sagemaker-scikit-learn`, `sagemaker-spark-processing`, `sagemaker-sparkml-serving`, `sagemaker-tensorflow`, `sagemaker-tensorflow-eia`, `sagemaker-tensorflow-scriptmode`, `sagemaker-tensorflow-serving`, `sagemaker-tensorflow-serving-eia`, `sagemaker-tritonserver`, `sagemaker-xgboost`, `semantic-segmentation`, `seq2seq`, `stabilityai-pytorch-inference`, `tei`, `tei-cpu`, `tensorflow-inference`, `tensorflow-inference-eia`, `tensorflow-inference-graviton`, `tensorflow-training`, and `xgboost-neo`. * `dns_suffix` - (Optional) DNS suffix to use in the registry path. If not specified, the AWS provider sets it to the DNS suffix for the current region. * `image_tag` - (Optional) Image tag for the Docker image. If not specified, the AWS provider sets the value to `1`, which for many repositories indicates the latest version. Some repositories, such as XGBoost, do not support `1` or `latest` and specific version must be used. * `region` (Optional) - Region to use in the registry path. If not specified, the AWS provider sets it to the current region.