Giter Club home page Giter Club logo

aws-connect-agent-event-processor's Introduction

aws-connect-agent-event-processor

This demo solution uses a Lambda function to process records in an Amazon Kinesis data stream that has been configured to receive the Agent Events streaming from your Amazon Connect instance. The Kinesis event source mapping for the Lambda function uses FilterCriteria to filter agent events of STATE_CHANGE and sends out SMS/Email notifications if the agent status changed to any state that is not equal to Available.

Deploy the sample application

The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications.

To use the SAM CLI, you need the following tools.

To build and deploy your application for the first time,

  1. Copy the samconfig.toml.tmpl to samconfig.toml and update the following parameters:
parameter_overrides = [
    "ConnectInstanceArn=",
    "ConnectAgentEventsStreamArn=",
    "NotificationEmailAddr=",
    "NotificationPhoneNumber="
]
  1. Run the following in your shell:
sam build
sam deploy

The first command will build the source of your application. The second command will package and deploy your application to AWS using the default configurations provided in the samconfig.toml file.

Use the SAM CLI to build and test locally

Build your application with the sam build --use-container command.

sam build

The SAM CLI installs dependencies defined in requirements.txt, creates a deployment package, and saves it in the .aws-sam/build folder.

Test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the events folder in this project.

Run functions locally and invoke them with the sam local invoke command.

sam local invoke ConnectAgentEventsFunction --event events/event.json

Tests

Cleanup

To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:

sam delete --stack-name "aws-connect-agent-event-processor"

Resources

See the AWS SAM developer guide for an introduction to SAM specification, the SAM CLI, and serverless application concepts.

Next, you can use AWS Serverless Application Repository to deploy ready to use Apps that go beyond hello world samples and learn how authors developed their applications: AWS Serverless Application Repository main page

aws-connect-agent-event-processor's People

Contributors

philiptran avatar

Watchers

 avatar

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.