Giter VIP home page Giter VIP logo

workdocs-s3-integration's Introduction

Automate Deployment of Lambda Function

Purpose Automate the integration of Amazon S3 bucket and Amazon WorkDocs with the s3 trigger defined by the user.

Dependencies

TL;DR This will create the following AWS infrastructure

  • S3TriggerBucket
  • Lambda Function and Role
  • Lambda Permission

Automating integration of S3 and WorkDocs

  1. Prerequisites/Assumptions Assumption : A WorkDocs Application is already set up as mentioned in the below link: https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html

  2. The code requires that you obtain an Amazon WorkDocs Organization ID.You can get a Amazon WorkDocs organization ID from the AWS console using the following steps:To get an organization ID

  • In the [Link AWS Directory Service console](Link https://console.aws.amazon.com/directoryservicev2/) navigation pane, select Directories.
  • The Directory ID corresponding to your Amazon WorkDocs site is the Organization ID for that site.
  • Copy the Organization ID and Description and paste it in the ID and Query for the Parameter section in template.yaml
  1. Steps to set up the Automation a. Build lambda function, and prepare them for subsequent steps in the workflow

Command: sam build -b ./build -s . -t template.yaml -u b. Packages the above LambdaFunction. It creates a ZIP file of the code and dependencies, and uploads it to Amazon S3 (please create the S3 bucket and mention the bucket name in the command below). It then returns a copy of AWS SAM template, replacing references to local artifacts with the Amazon S3 location where the command uploaded the artifacts

Command: sam package
--template-file build/template.yaml
--s3-bucket ${YOUR_S3_SAM_BUCKET}
--output-template-file build/packaged.yaml c. Deploy Lambda functions through AWS CloudFormation from the S3 bucket created above. AWS SAM CLI now creates and manages this Amazon S3 bucket for you.

Command: sam deploy
--template-file build/packaged.yaml
--stack-name S3-WorkDocs
--capabilities CAPABILITY_NAMED_IAM
--parameter-overrides S3TriggerBucketName=${YOUR_NEW_STATIC_SITE_BUCKET_NAME}

  1. Steps to Check the Integration Put a Object in the S3TriggerBucket and the corresponding object should be available in the WorkDocs folder path.

Security See CONTRIBUTING for more information.

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

Contributors Matt Noyce Viyoma Sachdeva

workdocs-s3-integration's People

Contributors

amazon-auto avatar chriscoombs avatar dependabot[bot] avatar noyce-cloud avatar noyceguy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

chriscoombs

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.