Storing User Files with Express, Stormpath, and Amazon S3

Storing User Files with Express, Stormpath, and Amazon S3

These are slides from a webinar talk I gave on October 6, 2016 in which I explain to developers:

- How to best store user files for web applications using Amazon S3.
- How to build a simple and secure Express website with express-stormpath.
- How to upload and manage user files using express-stormpath-s3.

56badf521701d4f9b3a394d3ef6e90c4?s=128

Randall Degges

October 06, 2016
Tweet

Transcript

  1. Storing User Files with Express, Stormpath, and Amazon S3 @rdegges

  2. I’m Randall Degges Developer Evangelist at Stormpath Python / Node

    / Go Hacker
  3. Agenda - Stormpath Intro (5 minutes) - Main Talk (30

    minutes) - Q/A (15 minutes)
  4. Intro to Stormpath API Service Website Mobile App

  5. We Do a Lot - Libraries for many languages -

    AD / LDAP - Single Sign On (SAML) - OAuth2 - Social Login - Multi-Tenancy - Groups and Roles - Email Workflows
  6. What’s the problem?

  7. www.awesome.io avatar.png receipt.pdf invoice.pdf Stormpath! ???

  8. How do people usually store user files?

  9. Database Columns

  10. No!!! - Makes DB queries for each image view. -

    Slows down DB. - DBs aren’t good at this sort of IO (heavy disk reading). - Slow performance for end users.
  11. Your Webserver(s) Webserver avatar.png avatar.png avatar.png avatar.png avatar.png avatar.png avatar.png

    avatar.png LOW DISK SPACE!! OMG! Backups?!
  12. None
  13. Amazon S3 - Reliability. - Durability. - Availability. - Cost.

    - Speed. - Security ACLs.
  14. How S3 Works webserver

  15. None
  16. Cool, Right?

  17. So… Let’s Build Something!

  18. The Magic!

  19. None
  20. None
  21. None
  22. None
  23. This sets up the S3 client and adds simple file

    methods onto . Required.
  24. Setup Done!

  25. Upload Files Path to local file you want to upload.

  26. Upload Files (cont) Desired ACL for file.

  27. Delete Files

  28. (demo)

  29. Resources - https://github.com/rdegges/express-stormp ath-s3 - https://aws.amazon.com/s3/ - https://stormpath.com/ - https://github.com/rdegges/express-stormp

    ath-s3-webinar - https://docs.aws.amazon.com/AmazonS3/lat est/dev/acl-overview.html
  30. You’re awesome. @rdegges