Skip to content

Commit

Permalink
chore(s3): upgrade S3BucketNotifications Lambda to python3.11 (#29506)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes D122674750.

### Reason for this change

This Lambda does not work in new regions.

### Description of changes

Current S3BucketNotifications Custom Resource Lambda `python3.9` uses `botocore` version `1.29.90` which does not have S3 endpoint information for new regions.

Upgrading to `python3.11` which has `botocore` version `1.30.1`. See more in D122674750.

Note that we cannot upgrade to `python3.12` because it's not available in all regions yet.

### Description of how you validated changes

N/A.

### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
yerzhan7 authored Mar 15, 2024
1 parent f2ad980 commit 3d14b3b
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"Arn"
]
},
"Runtime": "python3.9",
"Runtime": "python3.11",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class NotificationsResourceHandler extends Construct {
Code: { ZipFile: handlerSourceWithoutComments },
Handler: 'index.handler',
Role: this.role.roleArn,
Runtime: 'python3.9',
Runtime: 'python3.11',
Timeout: 300,
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-s3/test/notification.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ describe('notification', () => {
});

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Runtime: 'python3.9',
Runtime: 'python3.11',
});
});
});

0 comments on commit 3d14b3b

Please sign in to comment.