-
Notifications
You must be signed in to change notification settings - Fork 4.2k
chore(ecs): update instance-drain-hook lambda runtime to python 3.13 (closes #34634) #34639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
8f21b05
to
be8acfd
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
142d99f
to
0b257dd
Compare
0b257dd
to
a257b45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making this update!
a257b45
to
4294dcd
Compare
4294dcd
to
0ee8344
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I'm requesting a small change to it.
@@ -11,7 +11,7 @@ def lambda_handler(event, context): | |||
lifecycle_event = json.loads(event['Records'][0]['Sns']['Message']) | |||
instance_id = lifecycle_event.get('EC2InstanceId') | |||
if not instance_id: | |||
print('Got event without EC2InstanceId: %s', json.dumps(dict(event, ResponseURL='...'))) | |||
print('Got event without EC2InstanceId: %s' % json.dumps(dict(event, ResponseURL='...'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use f-strings since we're using python 3.13?
print('Got event without EC2InstanceId: %s' % json.dumps(dict(event, ResponseURL='...'))) | |
print(f"Got event without EC2InstanceId: { json.dumps(dict(event, ResponseURL='...')) }") |
Issue # (if applicable)
Closes #34634.
Reason for this change
The old Lambda Runtime Python 3.9 is being deprecated
Description of changes
Describe any new or updated permissions being added
None
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license