gabehollombe-aws / step-functions-workshop Goto Github PK
View Code? Open in Web Editor NEWIntro to Service Coordination with AWS Step Functions
Home Page: https://step-functions-workshop.go-aws.com/
Intro to Service Coordination with AWS Step Functions
Home Page: https://step-functions-workshop.go-aws.com/
I have received an Error: Invoked function failed with the message Cannot find module 'uuid/v4':
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'uuid/v4'",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'uuid/v4'",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.<anonymous> (/var/runtime/index.js:45:30)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)",
" at startup (internal/bootstrap/node.js:283:19)"
]
}
I have the same issue reported here https://stackoverflow.com/questions/57906632/lambda-code-works-on-node-v8-10-but-not-nodejs-v10-x , it seems that with nodejs v10 I should add the library. I have solved creating an AWS Lambda layer with the library and adding reference in serverless.jml
For the life of me, I've searched and searched and can't find a reference to what "command" actually does in the parameters sub-section. Is it another way to comment the section? TIA.
This is not an issue with code. I would like to learn why SAM is not passing payload to lambda. I have added launch configurations for both SubmitApplicationFunction and FlagApplicationFunction in Cloud9 as shown below.
Running SubmitApplicationFunction launch configuration works as expected passing the payload to lambda, however running FlagApplicationFunction launch configuration does not pass payload to lambda.
Both functions work when running with aws lambda invoke
Any ideas on what I may be doing wrong here?
Thanks.
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "workshop-dir:FlagApplicationFunction",
"invokeTarget": {
"target": "template",
"templatePath": "workshop-dir/template.yaml",
"logicalId": "FlagApplicationFunction"
},
"lambda": {
"payload": {
"id": "application_e63632fe-d277-47be-a763-7472e0c6bd70",
"flagType": "REVIEW"
},
"environmentVariables": {
"APPLICATIONS_TABLE_NAME": "StepFunctionWorkshop-AccountApplications-step-functions-workshop"
}
}
},
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "workshop-dir:SubmitApplicationFunction",
"invokeTarget": {
"target": "template",
"templatePath": "workshop-dir/template.yaml",
"logicalId": "SubmitApplicationFunction"
},
"lambda": {
"payload": {
"name": "Spock1234",
"address": "1234 Enterprise Street"
},
"environmentVariables": {
"APPLICATIONS_TABLE_NAME": "StepFunctionWorkshop-AccountApplications-step-functions-workshop"
}
}
}
]
}
Need to add --cli-binary-format raw-in-base64-out
if you're using AWS CLI v2.
Should be
aws lambda invoke --function-name sfn-workshop-SubmitApplication --payload '{ "name": "Spock", "address": "123 Enterprise Street" }' --cli-binary-format raw-in-base64-out /dev/stdout
I can't seem to message you on Twitter so l wanted to send my tremendous thanks and appreciation.
{
"errorType": "MissingRequiredParameter",
"errorMessage": "Missing required key 'TableName' in params",
"trace": [
"MissingRequiredParameter: Missing required key 'TableName' in params",
" at ParamValidator.fail (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:50:37)",
" at ParamValidator.validateStructure (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:61:14)",
" at ParamValidator.validateMember (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:88:21)",
" at ParamValidator.validate (/var/runtime/node_modules/aws-sdk/lib/param_validator.js:34:10)",
" at Request.VALIDATE_PARAMETERS (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:126:42)",
" at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
" at callNextListener (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:96:12)",
" at /var/runtime/node_modules/aws-sdk/lib/event_listeners.js:86:9",
" at finish (/var/runtime/node_modules/aws-sdk/lib/config.js:379:7)",
" at /var/runtime/node_modules/aws-sdk/lib/config.js:397:9"
]
}
I got this error when trying to tie in the SubmitApplication
lambda on Starting our workflow when a new application is submitted
Here's the first my first attempt to add api gateway integration to the workshop example. It is working but may need some cleaning up. Suggestions are welcome.
Add "FlagApplicationFunctionName" as Output in template.yml
1 validation error detected: Value '${FlagApplicationFunctionName}' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-.]+)(:($LATEST|[a-zA-Z0-9-]+))? (Service: AWSLambda; Status Code: 400; Error Code: ValidationException; Request ID: 0c6af15c-5d2e-4865-ba2d-56f291045f5e; Proxy: null)
"Pending Review": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke.waitForTaskToken",
"Parameters": {
"FunctionName": "${FlagApplicationFunctionName}",
"Payload": {
"id.$": "$.application.id",
"flagType": "REVIEW",
"taskToken.$": "$$.Task.Token"
}
},
"ResultPath": "$.review",
"Next": "Review Approved?"
},
Can you provide instructions on how to achieve the clipboard and click to view diff
effect with new files/updates to existing files?
Adding a new file and updating the paths in code such as this
with ___CLIPBOARD_BUTTON code/variants/template.yml/0-initial__template.yaml&code/variants/template.yml/1-fixing-permissions__template.yaml|
results in file exists on disk but not on HEAD error from Hugo during the build.
Specifically, I would like to
this content
button)Click to view diff
button (similar to Home > Our first orchestration > Fixing Permissions > Make these changes > Step 4
)Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.