Skip to content

Commit c00b8a3

Browse files
Shreyapraneetap
Shreya
authored andcommitted
chore: upgrade to nodejs12.x for all examples and tests (aws#1363)
1 parent 1165070 commit c00b8a3

File tree

483 files changed

+757
-757
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+757
-757
lines changed

HOWTO.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Resources:
130130
Type: AWS::Serverless::Function
131131
Properties:
132132
Handler: index.handler
133-
Runtime: nodejs4.3
133+
Runtime: nodejs12.x
134134
CodeUri:
135135
# !Ref function allows you to fetch value
136136
# of parameters and other resources at runtime
@@ -158,7 +158,7 @@ Resources:
158158
FunctionName: !Sub "mylambda-${FunctionNameSuffix}"
159159

160160
Handler: index.handler
161-
Runtime: nodejs4.3
161+
Runtime: nodejs12.x
162162
CodeUri: s3://bucket/key
163163
```
164164

docs/safe_lambda_deployments.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ resource:
9393
Type: AWS::Serverless::Function
9494
Properties:
9595
Handler: index.handler
96-
Runtime: nodejs8.10
96+
Runtime: nodejs12.x
9797
AutoPublishAlias: live
9898
DeploymentPreference:
9999
Type: Linear10PercentEvery10Minutes
@@ -163,7 +163,7 @@ resource:
163163
Action:
164164
- "lambda:InvokeFunction"
165165
Resource: !GetAtt MyLambdaFunction.Arn
166-
Runtime: nodejs8.10
166+
Runtime: nodejs12.x
167167
FunctionName: 'CodeDeployHook_preTrafficHook'
168168
DeploymentPreference:
169169
Enabled: False

examples/2016-10-31/alexa_skill/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Resources:
77
Properties:
88
CodeUri: s3://<bucket>/alexa_skill.zip
99
Handler: index.handler
10-
Runtime: nodejs6.10
10+
Runtime: nodejs12.x
1111
Events:
1212
AlexaSkillEvent:
1313
Type: AlexaSkill

examples/2016-10-31/api_aws_iam_auth/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Resources:
1515
Properties:
1616
CodeUri: .
1717
Handler: index.handler
18-
Runtime: nodejs8.10
18+
Runtime: nodejs12.x
1919
Events:
2020
GetRoot:
2121
Type: Api

examples/2016-10-31/api_backend/template.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Function
77
Properties:
88
Handler: index.get
9-
Runtime: nodejs6.10
9+
Runtime: nodejs12.x
1010
CodeUri: src/
1111
Policies:
1212
- DynamoDBReadPolicy:
@@ -25,7 +25,7 @@ Resources:
2525
Type: AWS::Serverless::Function
2626
Properties:
2727
Handler: index.put
28-
Runtime: nodejs6.10
28+
Runtime: nodejs12.x
2929
CodeUri: src/
3030
Policies:
3131
- DynamoDBCrudPolicy:
@@ -44,7 +44,7 @@ Resources:
4444
Type: AWS::Serverless::Function
4545
Properties:
4646
Handler: index.delete
47-
Runtime: nodejs6.10
47+
Runtime: nodejs12.x
4848
CodeUri: src/
4949
Policies:
5050
- DynamoDBCrudPolicy:

examples/2016-10-31/api_cognito_auth/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Resources:
2929
CodeUri: ./src
3030
Handler: lambda.handler
3131
MemorySize: 1024
32-
Runtime: nodejs8.10
32+
Runtime: nodejs12.x
3333
Environment:
3434
Variables:
3535
COGNITO_USER_POOL_CLIENT_ID: !Ref MyCognitoUserPoolClient
@@ -120,7 +120,7 @@ Resources:
120120
}
121121
Handler: index.handler
122122
MemorySize: 128
123-
Runtime: nodejs8.10
123+
Runtime: nodejs12.x
124124
Timeout: 3
125125
Events:
126126
CognitoUserPoolPreSignup:

examples/2016-10-31/api_gateway_responses/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Resources:
1818
Type: AWS::Serverless::Function
1919
Properties:
2020
Handler: index.get
21-
Runtime: nodejs6.10
21+
Runtime: nodejs12.x
2222
InlineCode: module.exports = async () => throw new Error('Check out the response headers!')
2323
Events:
2424
GetResource:

examples/2016-10-31/api_lambda_auth_cors/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Resources:
2222
Properties:
2323
CodeUri: src/
2424
Handler: authorizer.handler
25-
Runtime: nodejs10.x
25+
Runtime: nodejs12.x
2626

2727
HelloWorldFunction:
2828
Type: AWS::Serverless::Function
2929
Properties:
3030
CodeUri: src/
3131
Handler: index.handler
32-
Runtime: nodejs10.x
32+
Runtime: nodejs12.x
3333
Events:
3434
HelloWorld:
3535
Type: Api

examples/2016-10-31/api_lambda_request_auth/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Resources:
3030
Properties:
3131
CodeUri: ./src
3232
Handler: index.handler
33-
Runtime: nodejs8.10
33+
Runtime: nodejs12.x
3434
Events:
3535
GetRoot:
3636
Type: Api
@@ -53,7 +53,7 @@ Resources:
5353
Properties:
5454
CodeUri: ./src
5555
Handler: authorizer.handler
56-
Runtime: nodejs8.10
56+
Runtime: nodejs12.x
5757

5858
Outputs:
5959
ApiURL:

examples/2016-10-31/api_lambda_token_auth/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Resources:
2323
Properties:
2424
CodeUri: ./src
2525
Handler: index.handler
26-
Runtime: nodejs8.10
26+
Runtime: nodejs12.x
2727
Events:
2828
GetRoot:
2929
Type: Api
@@ -46,7 +46,7 @@ Resources:
4646
Properties:
4747
CodeUri: ./src
4848
Handler: authorizer.handler
49-
Runtime: nodejs8.10
49+
Runtime: nodejs12.x
5050

5151
Outputs:
5252
ApiURL:

examples/2016-10-31/api_request_model/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Resources:
2525
Type: AWS::Serverless::Function
2626
Properties:
2727
Handler: index.handler
28-
Runtime: nodejs6.10
28+
Runtime: nodejs12.x
2929
CodeUri: src/
3030
Events:
3131
GetApi:

examples/2016-10-31/api_resource_policy/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Resources:
3030
return response;
3131
};
3232
Handler: index.handler
33-
Runtime: nodejs8.10
33+
Runtime: nodejs12.x
3434
Events:
3535
Api:
3636
Type: Api

examples/2016-10-31/api_swagger_cors/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Resources:
2525
# Replace <bucket> with your bucket name
2626
CodeUri: s3://<bucket>/api_swagger_cors.zip
2727
Handler: index.handler
28-
Runtime: nodejs6.10
28+
Runtime: nodejs12.x
2929
Events:
3030
ProxyApiRoot:
3131
Type: Api

examples/2016-10-31/cloudwatch-logs/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Resources:
77
Properties:
88
CodeUri: ./index.js
99
Handler: index.handler
10-
Runtime: nodejs6.10
10+
Runtime: nodejs12.x
1111
Events:
1212
LogsProcessor:
1313
Type: CloudWatchLogs

examples/2016-10-31/custom_domains_with_route53/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Resources:
1818
return response;
1919
};
2020
Handler: index.handler
21-
Runtime: nodejs8.10
21+
Runtime: nodejs12.x
2222
Events:
2323
Fetch:
2424
Type: Api

examples/2016-10-31/custom_domains_without_route53/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Resources:
2828
return response;
2929
};
3030
Handler: index.handler
31-
Runtime: nodejs8.10
31+
Runtime: nodejs12.x
3232
Events:
3333
ImplicitGet:
3434
Type: Api

examples/2016-10-31/function_lambda_event_destinations/template.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Resources:
3838
Type: SQS
3939
CodeUri: ./src/
4040
Handler: index.handler
41-
Runtime: nodejs10.x
41+
Runtime: nodejs12.x
4242
MemorySize: 1024
4343

4444
EventDestinationSQSSNS:
@@ -56,7 +56,7 @@ Resources:
5656
Destination: !If [TopicCreationEnabled, !Ref 'AWS::NoValue', 'SOME-SNS-ARN']
5757
CodeUri: ./src/
5858
Handler: index.handler
59-
Runtime: nodejs10.x
59+
Runtime: nodejs12.x
6060
MemorySize: 1024
6161

6262
DestinationLambda:
@@ -71,7 +71,7 @@ Resources:
7171
return response;
7272
};
7373
Handler: index.handler
74-
Runtime: nodejs10.x
74+
Runtime: nodejs12.x
7575
MemorySize: 1024
7676
SNSSubscription:
7777
Type: AWS::SNS::Subscription

examples/2016-10-31/function_request_parameters/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Resources:
1212
Type: AWS::Serverless::Function
1313
Properties:
1414
Handler: index.handler
15-
Runtime: nodejs8.10
15+
Runtime: nodejs12.x
1616
CodeUri: src/
1717
Events:
1818
GetApi:

examples/2016-10-31/hello_world/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Resources:
77
Type: AWS::Serverless::Function
88
Properties:
99
Handler: index.handler
10-
Runtime: nodejs6.10
10+
Runtime: nodejs12.x
1111
CodeUri: src/

examples/2016-10-31/hello_world_vpc/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Resources:
1717
Type: AWS::Serverless::Function
1818
Properties:
1919
Handler: index.handler
20-
Runtime: nodejs8.10
20+
Runtime: nodejs12.x
2121
CodeUri: src/
2222
Policies:
2323
- VPCAccessPolicy: {}

examples/2016-10-31/implicit_api_settings/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Resources:
4242
# Replace <bucket> with your bucket name
4343
CodeUri: src/
4444
Handler: index.handler
45-
Runtime: nodejs6.10
45+
Runtime: nodejs12.x
4646
Events:
4747
ProxyApiRoot:
4848
Type: Api

examples/2016-10-31/inline_swagger/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Resources:
2828
Type: AWS::Serverless::Function
2929
Properties:
3030
Handler: index.handler
31-
Runtime: nodejs6.10
31+
Runtime: nodejs12.x
3232
CodeUri: src/
3333
Events:
3434
GetApi:

examples/2016-10-31/iot_backend/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Function
77
Properties:
88
Handler: index.handler
9-
Runtime: nodejs10.x
9+
Runtime: nodejs12.x
1010
CodeUri: src/
1111
Policies:
1212
- DynamoDBCrudPolicy:

examples/2016-10-31/lambda_edge/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LambdaEdgeFunctionSample:
99
Type: AWS::Serverless::Function
1010
Properties:
1111
CodeUri: src/
12-
Runtime: nodejs6.10
12+
Runtime: nodejs10.x
1313
Handler: index.handler
1414
Role: !GetAtt LambdaEdgeFunctionRole.Arn
1515
Timeout: 5
@@ -24,7 +24,7 @@ LambdaEdgeFunctionSample:
2424
Type: AWS::Serverless::Function
2525
Properties:
2626
CodeUri: src/
27-
Runtime: nodejs6.10
27+
Runtime: nodejs10.x
2828
Handler: index.handler
2929
Role: !GetAtt LambdaEdgeFunctionRole.Arn
3030
Timeout: 5

examples/2016-10-31/lambda_edge/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Resources:
6060
Properties:
6161
CodeUri: src/
6262
Role: !GetAtt LambdaEdgeFunctionRole.Arn
63-
Runtime: nodejs6.10
63+
Runtime: nodejs10.x
6464
Handler: index.handler
6565
Timeout: 5
6666
# More info at https://github.com/awslabs/serverless-application-model/blob/master/docs/safe_lambda_deployments.rst

examples/2016-10-31/lambda_safe_deployments/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Resources:
1010
Properties:
1111
Handler: safeTest.handler
1212
CodeUri: src/
13-
Runtime: nodejs8.10
13+
Runtime: nodejs12.x
1414
AutoPublishAlias: live
1515
DeploymentPreference:
1616
Type: Linear10PercentEvery1Minute
@@ -44,7 +44,7 @@ Resources:
4444
Action:
4545
- "lambda:InvokeFunction"
4646
Resource: !GetAtt safeTest.Arn
47-
Runtime: nodejs8.10
47+
Runtime: nodejs12.x
4848
FunctionName: 'CodeDeployHook_preTrafficHook'
4949
DeploymentPreference:
5050
Enabled: False

examples/2016-10-31/lambda_sns_filter_policy/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Resources:
77
Properties:
88
CodeUri: ./src
99
Handler: index.handler
10-
Runtime: nodejs8.10
10+
Runtime: nodejs12.x
1111
FunctionName: sam-example-lambda-sns-filter-policy-notification-logger
1212
Events:
1313
NotificationTopic:

examples/2016-10-31/policy_templates/all_policy_templates.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Resources:
55
Properties:
66
CodeUri: src/
77
Handler: index.handler
8-
Runtime: nodejs4.3
8+
Runtime: nodejs12.x
99
Policies:
1010

1111
- SQSPollerPolicy:

examples/2016-10-31/s3_processor/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Function
77
Properties:
88
Handler: index.handler
9-
Runtime: nodejs6.10
9+
Runtime: nodejs12.x
1010
CodeUri: src/
1111
Policies: AmazonS3ReadOnlyAccess
1212
Events:

examples/2016-10-31/schedule/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Resources:
66
Type: AWS::Serverless::Function
77
Properties:
88
Handler: index.handler
9-
Runtime: nodejs6.10
9+
Runtime: nodejs12.x
1010
CodeUri: src/
1111
Events:
1212
Timer:

examples/2016-10-31/sns_sqs/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Resources:
99
Properties:
1010
CodeUri: ./index.js
1111
Handler: index.handler
12-
Runtime: nodejs8.10
12+
Runtime: nodejs12.x
1313
Events:
1414
MySQSEvent:
1515
Type: SNS

examples/2016-10-31/sqs/template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Resources:
77
Properties:
88
CodeUri: ./index.js
99
Handler: index.handler
10-
Runtime: nodejs8.10
10+
Runtime: nodejs12.x
1111
Events:
1212
MySQSEvent:
1313
Type: SQS

0 commit comments

Comments
 (0)