Skip to content

Commit 3a3b5ef

Browse files
authored
Updated Python/Node versions (#159)
* Updated to Python 3.9 * Moving to Python 3.9 * Updated to Python 3.9 * Updated to Node 20 * Updated to th elatest version * Updated build environment * Updating pipeline compute * Updated defaults * Removed duplicate include
1 parent cc323c0 commit 3a3b5ef

13 files changed

Lines changed: 32 additions & 27 deletions

File tree

serverless-rest-api/javascript-http-sam/buildspec.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
version: 0.2
55
phases:
66
install:
7+
runtime-versions:
8+
nodejs: 20
79
commands:
810
# Install all dependencies (including dependencies for running tests)
911
- cd ./javascript-http-sam

serverless-rest-api/javascript-http-sam/pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Resources:
4242
Type: CODEPIPELINE
4343
Environment:
4444
Type: LINUX_CONTAINER
45-
ComputeType: BUILD_GENERAL1_SMALL
46-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
45+
ComputeType: BUILD_GENERAL1_MEDIUM
46+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
4747
EnvironmentVariables:
4848
- Name: BUILD_OUTPUT_BUCKET
4949
Value: !Ref BuildArtifactsBucket
@@ -68,8 +68,8 @@ Resources:
6868
Type: CODEPIPELINE
6969
Environment:
7070
Type: LINUX_CONTAINER
71-
ComputeType: BUILD_GENERAL1_SMALL
72-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
71+
ComputeType: BUILD_GENERAL1_MEDIUM
72+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
7373
EnvironmentVariables:
7474
- Name: TEST_APPLICATION_STACK_NAME
7575
Value: !Sub ${AWS::StackName}-Testing

serverless-rest-api/javascript-http-sam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Description: >
1010
1111
Globals:
1212
Function:
13-
Runtime: nodejs14.x
13+
Runtime: nodejs20.x
1414
MemorySize: 128
1515
Timeout: 100
1616
Tracing: Active

serverless-rest-api/python-http-cdk/lib/serverless_api_stack.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, scope: cdk.Construct, construct_id: str, cognito_stack_name="
6969
entry='src/api',
7070
index='locations.py',
7171
handler='lambda_handler',
72-
runtime=lmbd.Runtime.PYTHON_3_8,
72+
runtime=lmbd.Runtime.PYTHON_3_9,
7373
memory_size=1024,
7474
tracing=lmbd.Tracing.ACTIVE,
7575
environment={
@@ -84,7 +84,7 @@ def __init__(self, scope: cdk.Construct, construct_id: str, cognito_stack_name="
8484
entry='src/api',
8585
index='resources.py',
8686
handler='lambda_handler',
87-
runtime=lmbd.Runtime.PYTHON_3_8,
87+
runtime=lmbd.Runtime.PYTHON_3_9,
8888
memory_size=1024,
8989
tracing=lmbd.Tracing.ACTIVE,
9090
environment={
@@ -99,7 +99,7 @@ def __init__(self, scope: cdk.Construct, construct_id: str, cognito_stack_name="
9999
entry='src/api',
100100
index='bookings.py',
101101
handler='lambda_handler',
102-
runtime=lmbd.Runtime.PYTHON_3_8,
102+
runtime=lmbd.Runtime.PYTHON_3_9,
103103
memory_size=1024,
104104
tracing=lmbd.Tracing.ACTIVE,
105105
environment={
@@ -116,7 +116,7 @@ def __init__(self, scope: cdk.Construct, construct_id: str, cognito_stack_name="
116116
entry='src/api',
117117
index='authorizer.py',
118118
handler='lambda_handler',
119-
runtime=lmbd.Runtime.PYTHON_3_8,
119+
runtime=lmbd.Runtime.PYTHON_3_9,
120120
memory_size=1024,
121121
tracing=lmbd.Tracing.ACTIVE,
122122
environment={

serverless-rest-api/python-http-sam/buildspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.2
55
phases:
66
install:
77
runtime-versions:
8-
python: 3.8
8+
python: 3.12
99
commands:
1010
# Install all dependencies (including dependencies for running tests)
1111
- cd ./python-http-sam

serverless-rest-api/python-http-sam/pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Resources:
4242
Type: CODEPIPELINE
4343
Environment:
4444
Type: LINUX_CONTAINER
45-
ComputeType: BUILD_GENERAL1_SMALL
46-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
45+
ComputeType: BUILD_GENERAL1_MEDIUM
46+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
4747
EnvironmentVariables:
4848
- Name: BUILD_OUTPUT_BUCKET
4949
Value: !Ref BuildArtifactsBucket
@@ -68,8 +68,8 @@ Resources:
6868
Type: CODEPIPELINE
6969
Environment:
7070
Type: LINUX_CONTAINER
71-
ComputeType: BUILD_GENERAL1_SMALL
72-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
71+
ComputeType: BUILD_GENERAL1_MEDIUM
72+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
7373
EnvironmentVariables:
7474
- Name: TEST_APPLICATION_STACK_NAME
7575
Value: !Sub ${AWS::StackName}-Testing

serverless-rest-api/python-http-sam/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Description: >
1010
1111
Globals:
1212
Function:
13-
Runtime: python3.8
13+
Runtime: python3.12
1414
MemorySize: 128
1515
Timeout: 100
1616
Tracing: Active
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pytest
21
pytest-freezegun
3-
moto
2+
pytest>=7
3+
moto==3.1.19

serverless-rest-api/python-rest-sam/buildspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.2
55
phases:
66
install:
77
runtime-versions:
8-
python: 3.8
8+
python: 3.12
99
commands:
1010
# Install all dependencies (including dependencies for running tests)
1111
- cd ./python-rest-sam

serverless-rest-api/python-rest-sam/pipeline.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Resources:
4242
Type: CODEPIPELINE
4343
Environment:
4444
Type: LINUX_CONTAINER
45-
ComputeType: BUILD_GENERAL1_SMALL
46-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
45+
ComputeType: BUILD_GENERAL1_MEDIUM
46+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
4747
EnvironmentVariables:
4848
- Name: BUILD_OUTPUT_BUCKET
4949
Value: !Ref BuildArtifactsBucket
@@ -68,8 +68,8 @@ Resources:
6868
Type: CODEPIPELINE
6969
Environment:
7070
Type: LINUX_CONTAINER
71-
ComputeType: BUILD_GENERAL1_SMALL
72-
Image: aws/codebuild/amazonlinux2-x86_64-standard:3.0
71+
ComputeType: BUILD_GENERAL1_MEDIUM
72+
Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0
7373
EnvironmentVariables:
7474
- Name: TEST_APPLICATION_STACK_NAME
7575
Value: !Sub ${AWS::StackName}-Testing

0 commit comments

Comments
 (0)