Book Image

Implementing Cloud Design Patterns for AWS

Book Image

Implementing Cloud Design Patterns for AWS

Overview of this book

Table of Contents (18 chapters)
Implementing Cloud Design Patterns for AWS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Direct object upload pattern


In this last pattern, we will try to resolve the original issue in a different way rather than optimize on the original attempt. The problem we are facing is how to handle data that needs to be uploaded to a central store. We would like to stay with Amazon-provided services as much as possible, so what we will attempt to do here is demonstrate direct upload into S3 from a web server.

In both the write proxy pattern and the storage index pattern, we allowed the user to upload into S3 using an FTP server as a proxy. S3 itself has a very robust HTTP POST support and allows S3 access via HTTP methods, even without being configured for static website access, as we currently have enabled on our bucket.

For this pattern, we will set up a web instance with only the Apache HTTP web server on it, which contains a form to upload into our bucket. For the form to POST successfully, however, some steps must be taken to allow proper authorization from our server itself. We will...