Skip to content

Commit 8d6fbb2

Browse files
committed
add new file
1 parent 59a3f19 commit 8d6fbb2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
from __future__ import absolute_import
14+
15+
import boto3
16+
17+
18+
def regions():
19+
boto_session = boto3.Session()
20+
for partition in boto_session.get_available_partitions():
21+
for region in boto_session.get_available_regions("sagemaker", partition_name=partition):
22+
yield region

0 commit comments

Comments
 (0)