Skip to content
Use AWS to read EULAs to you!
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
builds
docs
eulas
icons
lib
output
tests
uploaded
.gitignore
LICENSE
README.md
app.js
jest.config.js
package-lock.json
package.json

README.md

EULAgy

Get a EULA read to you.


What EULAgy does

EULAgy takes a text file, converts it to an mp3 and generates a csv based on the Amazon Comprehend findings.

EULAgy is a utility that can be plugged into an application that will stream an mp3. Or an application that wants to analyze the key phrases in a text file.

And (shhhh, don't tell) EULAgy will work for any text file, not just EULAs :).

  • EULAgy uses Amazon Polly to create an mp3 from EULA text
  • EULAgy uses Amazon Comprehend to create a csv from EULA text
  • EULAgy is designed to work on AWS Lambda, but can also be run from the command line

Using

AWS Lambda

See Deploy below. Place txt files in the root S3 bucket -- output will appear in the uploaded folder of the S3 bucket.

Develop

  1. Install npm
  2. npm install
  3. npm test to validate setup!

Deploy

S3 bucket

  1. Create a bucket in S3
  2. Create a folder named uploaded in the bucket
  3. Create an AWS role with AWSLambdaExecute, AmazonPollyFullAccess, AmazonS3FullAccess and ComprehendFullAccess
  4. Add this policy to the bucket
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::<user_id>:role/<role_name>
            },
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::<bucket_name>/*"
        }
    ]
}
  1. Replace bucket references in JavaScript code with your bucket name

Lambda

  1. Create a new Lambda function with the role you created
  2. Give the function a Timeout of 10 seconds
  3. Run npm run zpack to create the artifact (a zip file) in the build directory
  4. Upload the artifact to your Lambda function in AWS

Helper functions

S3

Create bucket

Bucket name defaults to eulagy. Will not create a bucket that already exists.

node lib/buckets create [name]

List buckets

node lib/buckets
You can’t perform that action at this time.