Skip to content

An AWS AppSync resolver that interacts with and returns data about AWS StepFunctions

License

Notifications You must be signed in to change notification settings

QuiNovas/appsync-stepfunctions-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

appsync-stepfunctions-resolver

An AWS AppSync resolver that interacts with and returns data about AWS StepFunctions

AWS Permissions Required

  • states:DescribeExecution
  • states:StopExecution

Handler Method

function.handler

Request Syntax

{
  "operation": "describeExecution",
  "arguments": {
    "executionArn": "arn"
  }
}

{
  "operation": "stopExecution",
  "arguments": {
    "executionArn": "arn",
    "error": "string"
    "cause": "string"
  }
}
operation - REQUIRED
Can be one of describeExecution or stopExecution.
describeExecution
executionArn:The Amazon Resource Name (ARN) of the execution to describe - REQUIRED
stopExecution
executionArn:The Amazon Resource Name (ARN) of the execution to stop - REQUIRED
error:The error code of the failure
cause:A more detailed explanation of the cause of the failure

Each of these requests can be batched via the BatchInvoke protocol from Appsync.

Response syntax

For describeExecution and stopExecution:

{
  'executionArn': 'string',
  'stateMachineArn': 'string',
  'name': 'string',
  'status': 'RUNNING'|'SUCCEEDED'|'FAILED'|'TIMED_OUT'|'ABORTED',
  'startDate': datetime(2015, 1, 1),
  'stopDate': datetime(2015, 1, 1),
  'input': 'string',
  'output': 'string'
}

Example AWS Appsync schema:

type Execution {
  executionArn: String!
  stateMachineArn: String!
  name: String!
  status: String!
  startDate: AWSDateTime!
  stopDate: AWSDateTime!
  input: String!
  output: String
}

type Mutation {
  stopExecution(executionArn: String!, error: String, cause: String): Execution
}

type Query {
  describeExecution(executionArn: String!): Execution
}

schema {
  query: Query
  mutation: Mutation
}

Lambda Package Location

https://s3.amazonaws.com/lambdalambdalambda-repo/quinovas/appsync-stepfunctions-resolver/appsync-stepfunctions-resolver-0.0.1.zip

License: APL2

About

An AWS AppSync resolver that interacts with and returns data about AWS StepFunctions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages