Skip to content

Commit 3fffde3

Browse files
author
pintaoz
committed
update custom s3 name
1 parent 60a204f commit 3fffde3

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

doc/cli/cluster_management/cli_cluster_management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ The `config.yaml` file supports the following parameters:
358358
| `create_s3_endpoint_stack` | BOOLEAN | Create S3 Endpoint stack | true |
359359
| `enable_hp_inference_feature` | BOOLEAN | Enable inference operator | false |
360360
| `stage` | TEXT | Deployment stage ("gamma" or "prod") | "prod" |
361-
| `custom_bucket_name` | TEXT | S3 bucket name for templates | "aws-sagemaker-hyperpod-cluster-setup" |
361+
| `custom_bucket_name` | TEXT | Custom S3 bucket name for templates | "" |
362362
| `create_life_cycle_script_stack` | BOOLEAN | Create Life Cycle Script Stack | true |
363363
| `create_s3_bucket_stack` | BOOLEAN | Create S3 Bucket Stack | true |
364364
| `s3_bucket_name` | TEXT | S3 bucket for cluster lifecycle scripts | "s3-bucket" |

hyperpod-cluster-stack-template/hyperpod_cluster_stack_template/v1_0/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ClusterStackBase(BaseModel):
3535
create_s3_endpoint_stack: Optional[bool] = Field(True, description="Boolean to Create S3 Endpoint stack")
3636
enable_hp_inference_feature: Optional[bool] = Field(False, description="Boolean to enable inference operator in Hyperpod cluster")
3737
stage: Optional[str] = Field("prod", description="Deployment stage used in S3 bucket naming for inference operator. Valid values: \"gamma\", \"prod\"")
38-
custom_bucket_name: str = Field("aws-sagemaker-hyperpod-cluster-setup", description="S3 bucket name for templates")
38+
custom_bucket_name: str = Field("", description="Custom S3 bucket name for templates")
3939
create_life_cycle_script_stack: Optional[bool] = Field(True, description="Boolean to Create Life Cycle Script Stack")
4040
create_s3_bucket_stack: Optional[bool] = Field(True, description="Boolean to Create S3 Bucket Stack")
4141
s3_bucket_name: Optional[str] = Field("s3-bucket", description="The name of the S3 bucket used to store the cluster lifecycle scripts")

hyperpod-cluster-stack-template/hyperpod_cluster_stack_template/v1_0/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
"title": "Stage"
440440
},
441441
"custom_bucket_name": {
442-
"default": "aws-sagemaker-hyperpod-cluster",
442+
"default": "",
443443
"description": "S3 bucket name for templates",
444444
"title": "Custom Bucket Name",
445445
"type": "string"

src/sagemaker/hyperpod/cluster_management/hp_cluster_stack.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
from sagemaker.hyperpod.common.telemetry.constants import Feature
1616

1717
CAPABILITIES_FOR_STACK_CREATION = [
18-
'CAPABILITY_IAM',
19-
'CAPABILITY_NAMED_IAM'
18+
'CAPABILITY_AUTO_EXPAND',
19+
'CAPABILITY_IAM',
20+
'CAPABILITY_NAMED_IAM'
2021
]
2122
log = logging.getLogger()
2223

@@ -112,7 +113,7 @@ def create(self,
112113

113114
stack_name = f"HyperpodClusterStack-{str(uuid.uuid4())[:5]}"
114115
# Use the fixed bucket name from the model
115-
bucket_name = self.custom_bucket_name
116+
bucket_name = "aws-sagemaker-hyperpod-cluster-setup"
116117
template_key = f"{template_version}/templates/main-stack-eks-based-template.yaml"
117118

118119
try:

test/unit_tests/cli/test_cluster_stack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def test_create_cluster_stack_success(self, mock_hp_cluster_stack_class, mock_lo
337337
mock_model_class.assert_called_once_with(**{'key': 'value'})
338338
mock_model_instance.to_config.assert_called_once_with(region='us-west-2')
339339
mock_hp_cluster_stack_class.assert_called_once_with(**{'transformed': 'config'})
340-
mock_sdk_instance.create.assert_called_once_with('us-west-2')
340+
mock_sdk_instance.create.assert_called_once_with('us-west-2', 1)
341341

342342
@patch('os.path.exists')
343343
def test_create_cluster_stack_file_not_found(self, mock_exists, mock_get_template, mock_read_text):

0 commit comments

Comments
 (0)