Git Product home page Git Product logo

ac-contactflowapi's Introduction

Amazon Connect contact flow API's demo

This demo shows how you can leverage Amazon Connect api's to manage contact flows.

Usage

Use sam to build, invoke and deploy the function.

SAM Build:

Ensure you are in the root folder

sam build --use-container

SAM Deploy:

sam deploy template.yaml --s3-bucket REPLACE-ME --stack-name sam-cf1 --capabilities CAPABILITY_IAM --parameter-overrides ParameterKey=CFS3BucketForWebSite,ParameterValue=REPLACE-ME ParameterKey=backupDDBTable,ParameterValue=REPLACE-ME ParameterKey=arnMappingDDBTable,ParameterValue=REPLACE-ME

ac-contactflowapi's People

Contributors

amazon-auto avatar ramprasadsv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ac-contactflowapi's Issues

Wrong file name in yaml template

https://github.com/aws-samples/ac-contactflowapi/blob/master/template.yaml
Calls for connectflows.html
The file that gets compressed and push to the S3 bucket to deploy to cloudfront is called
contactflowapi.html
The manifest file is also wrong
https://github.com/aws-samples/ac-contactflowapi/blob/master/website-creator/web-site-manifest.json
from
https://github.com/aws-samples/ac-contactflowapi/tree/master/website-creator
Lambda cloudwatch exception:

{
"errorType": "Runtime.UnhandledPromiseRejection",
"errorMessage": "Error: ENOENT: no such file or directory, open './connectflows.html'",
"reason": {
"errorType": "Error",
"errorMessage": "ENOENT: no such file or directory, open './connectflows.html'",
"code": "ENOENT",
"errno": -2,
"syscall": "open",
"path": "./connectflows.html",
"stack": [
"Error: ENOENT: no such file or directory, open './connectflows.html'",
" at Object.openSync (fs.js:462:3)",
" at Object.readFileSync (fs.js:364:35)",
" at uploadToS3 (/var/task/website-helper.js:77:31)",
" at /var/task/website-helper.js:43:17",
" at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)"
]
},
"promise": {},
"stack": [
"Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, open './connectflows.html'",
" at process. (/var/runtime/index.js:35:15)",
" at process.emit (events.js:314:20)",
" at process.EventEmitter.emit (domain.js:483:12)",
" at processPromiseRejections (internal/process/promises.js:209:33)",
" at processTicksAndRejections (internal/process/task_queues.js:98:32)"
]
}

Backups not working

I've deployed this example but the backup flows button doesn't seem to work. I see no DDB entries in either the ARN mapping table or the Contact Flow table. The UI grabs the flows from both instances just fine. Can someone point me in a direction? It looks as if there's a single lambda that performs all the work but see no logs in cloudwatch other than when it was deployed. The only deviation from the documented example is that I'm using two connect instances in the same AWS account versus two instances in separate accounts.

NetworkingError: Network Failure Cross-Origin Request Blocked

I've deployed the stack in us-east-1 and all my Connect instances are in us-west-2. Not sure if that matters, getting the AWS configuration yields this error.

image

The browser console shows this:
XHRGEThttps://connect.us-west-2.amazonaws.com/contact-flows-summary/xxx-de96-4dfa-a1a3-xxx?maxResults=100
CORS Missing Allow Origin

GET
https://connect.us-west-2.amazonaws.com/contact-flows-summary/xxx-de96-4dfa-a1a3-xxx?maxResults=100
Status
403
Forbidden
VersionHTTP/2
Transferred397 B (68 B size)
Referrer Policystrict-origin-when-cross-origin

Any ideas?

InvalidContactFlowException

I'm trying to move Contact Flows from one connect instance to another and am getting 400 Bad Request: InvalidContactFlowException. Is there a size limit on the Contact Flow Content? The smaller ones seem to work fine.

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.