-
-
Notifications
You must be signed in to change notification settings - Fork 45
Description
We need to update the serverless.yml files in https://github.com/DavidWells/serverless-workshop/tree/master/_instructor (ignore the other directories they are generated by npm run docs
The services are outdated. All the runtime: nodejs12.x need to be nodejs22x that latest runtime from AWS
Also please replace usage of the AWS v2 SDK for the newer AWS v3 sdk for example in https://github.com/DavidWells/serverless-workshop/blob/master/lessons/events/dynamodb-streams/handler.js & https://github.com/DavidWells/serverless-workshop/blob/master/lessons/events/step-functions/handler.js etc.
Also make all the examples use ESM modules (import, export syntax) instead of the cjs they are currently using
Very Important: DO NOT remove any comments in the js code or in the yaml like these:
/* Step 6. In this_file the `startStateMachine` will handle the creation of the new step function.
Using the aws-sdk, use the StepFunctions `startExecution` method to start the new task
See docs for more details http://amzn.to/2zP0OPW
*/
provider:
name: aws
runtime: nodejs12.x
stage: ${self:custom.stage}
# Step 4. In this_file, reference the Output value of the state machine. ${self:resources.Outputs.MyStateMachine.Value} in the `environment` variables #
# Step 5. In this_file, Attach the need `iamRoleStatements` to Allow access to step functions `states:*` #
They are needed to generate the final workshop code. Keep all comments. Only update the yaml runtime and the javascript syntax and the aws SDK to v3
thanks @claude