Code Monkey home page Code Monkey logo

aws-samples / aws-amplify-stepfunctions-example Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 1.0 1.3 MB

Learn how to extend AWS Amplify resources with CDK v2 with this example that deploys a Step Functions workflow triggered via an Amplify-managed AppSync API

Home Page: https://aws.amazon.com/blogs/mobile/integrate-aws-step-functions-with-aws-amplify-using-amplify-custom-resources/

License: MIT No Attribution

HTML 2.88% JavaScript 28.16% TypeScript 68.96%
aws-amplify cdk step-functions

aws-amplify-stepfunctions-example's Introduction

aws-amplify-stepfunctions-example

In this sample, we’ll use an Amplify custom resource to add an AWS Step Functions workflow to our Amplify project.

What you will learn:

  • How to create a Step Functions workflow as an Amplify custom resource using the AWS CDK.
  • How to connect our custom resource to an existing Amplify-managed GraphQL API.

What you will build

The proposed solution consists of the following elements:

  • Our sample web application is a customer feedback form built using Vite and Amplify UI.
  • Submitting the feedback form will trigger a Step Functions express workflow created as an Amplify custom resource via an AWS AppSync API managed by Amplify.
  • The Step Function workflow will detect the sentiment of the submitted feedback using Amazon Comprehend’s DetectSentiment API.
  • Next, the workflow will store the feedback and detected sentiment in an Amplify-managed Amazon DynamoDB table.
  • If a non-positive sentiment is detected, the workflow will trigger a notification to a customer support email address using the Amazon Simple Notification Service (Amazon SNS).
  • Depending on the result of the sentiment analysis, our web application will display different confirmation messages to the customer.

The Step Functions workflow looks like this:

From the perspective of the user of our web application, the result will look like this:

For a walkthrough of the implementation, check out the blog post.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-amplify-stepfunctions-example's People

Contributors

amazon-auto avatar dependabot[bot] avatar dreamorosi avatar pbv0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lincolnhedgehog

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.