Giter Site home page Giter Site logo

gabehollombe-aws / step-functions-workshop Goto Github PK

View Code? Open in Web Editor NEW
40.0 40.0 33.0 13.09 MB

Intro to Service Coordination with AWS Step Functions

Home Page: https://step-functions-workshop.go-aws.com/

JavaScript 40.76% HTML 23.40% CSS 35.84%

step-functions-workshop's People

Contributors

asunar avatar gabehollombe avatar gabehollombe-aws avatar karadikid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

step-functions-workshop's Issues

Error: Invoked function failed - Cannot find module 'uuid/v4'

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

Use of the Commands field in Parameters?

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.

SAM launch configuration for Flag function does not pass payload to lambda

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"
                }
            }
        }
    ]
}

"errorMessage": "Missing required key 'TableName' in params"

{
  "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

Add "FlagApplicationFunctionName" as Output in template.yml

Add "FlagApplicationFunctionName" as Output in template.yml

Pending Review failing with the error:

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)

Code:

"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?"
},

Clipboard and click to view diff instructions

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

  • Add a new yaml file under code/variants
  • Put the contents of the new file in the clipboard (using the this content button)
  • Show the new file diff using the Click to view diff button (similar to Home > Our first orchestration > Fixing Permissions > Make these changes > Step 4 )
  • Make further changes to the template.yaml and use clipboard/diff feature to highlight those changes.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.