Skip to content

Commit 53cefc7

Browse files
Merge branch 'release-1.44.78'
* release-1.44.78: Bumping version to 1.44.78 Update changelog based on model updates Revert "Tighten output file permissions (#10197)" (#10214) Tighten CodeDeploy config file permissions (#10206)
2 parents 850022d + 6023f1c commit 53cefc7

12 files changed

Lines changed: 280 additions & 275 deletions

File tree

.changes/1.44.78.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[
2+
{
3+
"category": "``connect``",
4+
"description": "Conversational Analytics for Email",
5+
"type": "api-change"
6+
},
7+
{
8+
"category": "``devops-agent``",
9+
"description": "Devops Agent now supports associate Splunk, Datadog and custom MCP server to an Agent Space.",
10+
"type": "api-change"
11+
},
12+
{
13+
"category": "``ecs``",
14+
"description": "Minor updates to exceptions for completeness",
15+
"type": "api-change"
16+
},
17+
{
18+
"category": "``imagebuilder``",
19+
"description": "Image pipelines can now automatically apply tags to images they create. Set the imageTags property when creating or updating your pipelines to get started.",
20+
"type": "api-change"
21+
},
22+
{
23+
"category": "``mediaconvert``",
24+
"description": "Adds support for MV-HEVC video output and clear lead for AV1 DRM output.",
25+
"type": "api-change"
26+
},
27+
{
28+
"category": "``observabilityadmin``",
29+
"description": "CloudWatch Observability Admin adds support for multi-region telemetry evaluation and telemetry enablement rules.",
30+
"type": "api-change"
31+
},
32+
{
33+
"category": "``rtbfabric``",
34+
"description": "Adds optional health check configuration for Responder Gateways with ASG Managed Endpoints. When provided, RTB Fabric continuously probes customers' instance IPs and routes traffic only to healthy ones, reducing errors during deployments, scaling events, and instance failures.",
35+
"type": "api-change"
36+
},
37+
{
38+
"category": "``sagemaker``",
39+
"description": "Support new SageMaker StartClusterHealthCheck API for on-demand DHC on Hyperpod EKS cluster. Support updated CreateCluster, UpdateCluster, DescribeCluster, BatchAddClusterNodes APIs for flexible instance group on HyperPod cluster",
40+
"type": "api-change"
41+
},
42+
{
43+
"category": "codedeploy",
44+
"description": "Tighten file permissions for CodeDeploy configuration file",
45+
"type": "bugfix"
46+
}
47+
]

CHANGELOG.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
CHANGELOG
33
=========
44

5+
1.44.78
6+
=======
7+
8+
* api-change:``connect``: Conversational Analytics for Email
9+
* api-change:``devops-agent``: Devops Agent now supports associate Splunk, Datadog and custom MCP server to an Agent Space.
10+
* api-change:``ecs``: Minor updates to exceptions for completeness
11+
* api-change:``imagebuilder``: Image pipelines can now automatically apply tags to images they create. Set the imageTags property when creating or updating your pipelines to get started.
12+
* api-change:``mediaconvert``: Adds support for MV-HEVC video output and clear lead for AV1 DRM output.
13+
* api-change:``observabilityadmin``: CloudWatch Observability Admin adds support for multi-region telemetry evaluation and telemetry enablement rules.
14+
* api-change:``rtbfabric``: Adds optional health check configuration for Responder Gateways with ASG Managed Endpoints. When provided, RTB Fabric continuously probes customers' instance IPs and routes traffic only to healthy ones, reducing errors during deployments, scaling events, and instance failures.
15+
* api-change:``sagemaker``: Support new SageMaker StartClusterHealthCheck API for on-demand DHC on Hyperpod EKS cluster. Support updated CreateCluster, UpdateCluster, DescribeCluster, BatchAddClusterNodes APIs for flexible instance group on HyperPod cluster
16+
* bugfix:codedeploy: Tighten file permissions for CodeDeploy configuration file
17+
18+
519
1.44.77
620
=======
721

awscli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import os
2020

21-
__version__ = '1.44.77'
21+
__version__ = '1.44.78'
2222

2323
#
2424
# Get our data path to be added to botocore's search path

awscli/customizations/codedeploy/register.py

Lines changed: 52 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313

14+
import os
1415
import sys
1516

16-
from awscli.customizations.commands import BasicCommand
1717
from awscli.customizations.codedeploy.systems import DEFAULT_CONFIG_FILE
18-
from awscli.customizations.codedeploy.utils import \
19-
validate_region, validate_instance_name, validate_tags, \
20-
validate_iam_user_arn, INSTANCE_NAME_ARG, IAM_USER_ARN_ARG
18+
from awscli.customizations.codedeploy.utils import (
19+
IAM_USER_ARN_ARG,
20+
INSTANCE_NAME_ARG,
21+
validate_iam_user_arn,
22+
validate_instance_name,
23+
validate_region,
24+
validate_tags,
25+
)
26+
from awscli.customizations.commands import BasicCommand
2127
from awscli.utils import create_nested_client
2228

2329

@@ -39,15 +45,15 @@ class Register(BasicCommand):
3945
"Key": {
4046
"description": "The tag key.",
4147
"type": "string",
42-
"required": True
48+
"required": True,
4349
},
4450
"Value": {
4551
"description": "The tag value.",
4652
"type": "string",
47-
"required": True
48-
}
49-
}
50-
}
53+
"required": True,
54+
},
55+
},
56+
},
5157
}
5258

5359
ARG_TABLE = [
@@ -61,9 +67,9 @@ class Register(BasicCommand):
6167
'help_text': (
6268
'Optional. The list of key/value pairs to tag the on-premises '
6369
'instance.'
64-
)
70+
),
6571
},
66-
IAM_USER_ARN_ARG
72+
IAM_USER_ARN_ARG,
6773
]
6874

6975
def _run_main(self, parsed_args, parsed_globals):
@@ -79,12 +85,10 @@ def _run_main(self, parsed_args, parsed_globals):
7985
'codedeploy',
8086
region_name=params.region,
8187
endpoint_url=parsed_globals.endpoint_url,
82-
verify=parsed_globals.verify_ssl
88+
verify=parsed_globals.verify_ssl,
8389
)
8490
self.iam = create_nested_client(
85-
self._session,
86-
'iam',
87-
region_name=params.region
91+
self._session, 'iam', region_name=params.region
8892
)
8993

9094
try:
@@ -97,54 +101,41 @@ def _run_main(self, parsed_args, parsed_globals):
97101
if params.tags:
98102
self._add_tags(params)
99103
sys.stdout.write(
100-
'Copy the on-premises configuration file named {0} to the '
104+
f'Copy the on-premises configuration file named {DEFAULT_CONFIG_FILE} to the '
101105
'on-premises instance, and run the following command on the '
102106
'on-premises instance to install and configure the AWS '
103107
'CodeDeploy Agent:\n'
104-
'aws deploy install --config-file {0}\n'.format(
105-
DEFAULT_CONFIG_FILE
106-
)
108+
f'aws deploy install --config-file {DEFAULT_CONFIG_FILE}\n'
107109
)
108110
except Exception as e:
109111
sys.stdout.flush()
110112
sys.stderr.write(
111113
'ERROR\n'
112-
'{0}\n'
114+
f'{e}\n'
113115
'Register the on-premises instance by following the '
114116
'instructions in "Configure Existing On-Premises Instances by '
115117
'Using AWS CodeDeploy" in the AWS CodeDeploy User '
116-
'Guide.\n'.format(e)
118+
'Guide.\n'
117119
)
118120

119121
def _create_iam_user(self, params):
120122
sys.stdout.write('Creating the IAM user... ')
121123
params.user_name = params.instance_name
122124
response = self.iam.create_user(
123-
Path='/AWS/CodeDeploy/',
124-
UserName=params.user_name
125+
Path='/AWS/CodeDeploy/', UserName=params.user_name
125126
)
126127
params.iam_user_arn = response['User']['Arn']
127-
sys.stdout.write(
128-
'DONE\n'
129-
'IamUserArn: {0}\n'.format(
130-
params.iam_user_arn
131-
)
132-
)
128+
sys.stdout.write('DONE\n' f'IamUserArn: {params.iam_user_arn}\n')
133129

134130
def _create_access_key(self, params):
135131
sys.stdout.write('Creating the IAM user access key... ')
136-
response = self.iam.create_access_key(
137-
UserName=params.user_name
138-
)
132+
response = self.iam.create_access_key(UserName=params.user_name)
139133
params.access_key_id = response['AccessKey']['AccessKeyId']
140134
params.secret_access_key = response['AccessKey']['SecretAccessKey']
141135
sys.stdout.write(
142136
'DONE\n'
143-
'AccessKeyId: {0}\n'
144-
'SecretAccessKey: {1}\n'.format(
145-
params.access_key_id,
146-
params.secret_access_key
147-
)
137+
f'AccessKeyId: {params.access_key_id}\n'
138+
f'SecretAccessKey: {params.secret_access_key}\n'
148139
)
149140

150141
def _create_user_policy(self, params):
@@ -163,49 +154,50 @@ def _create_user_policy(self, params):
163154
self.iam.put_user_policy(
164155
UserName=params.user_name,
165156
PolicyName=params.policy_name,
166-
PolicyDocument=params.policy_document
157+
PolicyDocument=params.policy_document,
167158
)
168159
sys.stdout.write(
169160
'DONE\n'
170-
'PolicyName: {0}\n'
171-
'PolicyDocument: {1}\n'.format(
172-
params.policy_name,
173-
params.policy_document
174-
)
161+
f'PolicyName: {params.policy_name}\n'
162+
f'PolicyDocument: {params.policy_document}\n'
175163
)
176164

177165
def _create_config(self, params):
178166
sys.stdout.write(
179-
'Creating the on-premises instance configuration file named {0}'
180-
'...'.format(DEFAULT_CONFIG_FILE)
167+
f'Creating the on-premises instance configuration file named {DEFAULT_CONFIG_FILE}'
168+
'...'
181169
)
182-
with open(DEFAULT_CONFIG_FILE, 'w') as f:
183-
f.write(
184-
'---\n'
185-
'region: {0}\n'
186-
'iam_user_arn: {1}\n'
187-
'aws_access_key_id: {2}\n'
188-
'aws_secret_access_key: {3}\n'.format(
189-
params.region,
190-
params.iam_user_arn,
191-
params.access_key_id,
192-
params.secret_access_key
170+
try:
171+
fd = os.open(
172+
DEFAULT_CONFIG_FILE,
173+
os.O_WRONLY | os.O_CREAT | os.O_TRUNC,
174+
0o600,
175+
)
176+
with os.fdopen(fd, 'w') as f:
177+
os.chmod(DEFAULT_CONFIG_FILE, 0o600)
178+
f.write(
179+
'---\n'
180+
f'region: {params.region}\n'
181+
f'iam_user_arn: {params.iam_user_arn}\n'
182+
f'aws_access_key_id: {params.access_key_id}\n'
183+
f'aws_secret_access_key: {params.secret_access_key}\n'
193184
)
185+
except OSError as e:
186+
raise RuntimeError(
187+
f'Failed to create config file {DEFAULT_CONFIG_FILE}: {e}'
194188
)
195189
sys.stdout.write('DONE\n')
196190

197191
def _register_instance(self, params):
198192
sys.stdout.write('Registering the on-premises instance... ')
199193
self.codedeploy.register_on_premises_instance(
200-
instanceName=params.instance_name,
201-
iamUserArn=params.iam_user_arn
194+
instanceName=params.instance_name, iamUserArn=params.iam_user_arn
202195
)
203196
sys.stdout.write('DONE\n')
204197

205198
def _add_tags(self, params):
206199
sys.stdout.write('Adding tags to the on-premises instance... ')
207200
self.codedeploy.add_tags_to_on_premises_instances(
208-
tags=params.tags,
209-
instanceNames=[params.instance_name]
201+
tags=params.tags, instanceNames=[params.instance_name]
210202
)
211203
sys.stdout.write('DONE\n')

0 commit comments

Comments
 (0)