To create a Simple Storage Service (S3) bucket for data storage and retrieval.
Note: There is a new UI implementation of this feature. This older version will still be supported until it is replaced by the new S3 Browser. For more information, see S3 Browser (beta).
Table of Contents
In S3, a bucket is essentially a folder where you can store files in the Amazon cloud. Think of S3 as one big hard drive that everyone shares. As a result, you'll have to create unique bucket names. You will not be able to create generic bucket names like "files" or "images." Therefore, it's a good idea to add your application name as a prefix to any bucket name (e.g. myapp-images). The maximum number of S3 buckets per account is 100. The ownership of an S3 bucket is associated with your AWS Account Number and is non-transferrable. However, if a bucket is deleted, its name can be used to create a new S3 bucket in any AWS account.
As a best practice, create S3 buckets where the name is all in lower-case letters. Refrain from using underscores (_) as it's been known to cause problems at the DNS level. If you are using one of RightScale's MySQL ServerTemplates that support continuous backups of your database to S3, you need to specify an S3 bucket where the mysqldump files will be stored and retrieved. You should create an S3 bucket for this purpose before you launch a MySQL server.
Upper-case and lower-case letters are considered unique characters. For example, you can create an S3 bucket with the name 'MyBucket' and another bucket with 'mybucket' as its name.
WARNING! Watch out for two servers that backup into the same S3 bucket with the same prefix! You'll run into problems if you "Clone" a Deployment and forget to rename the prefix or the name of the S3 bucket before launching the Server.
At a minimum, you need to create an S3 bucket that you can later use to upload a dump (*.gz) of your MySQL database. If you are not using an SVN repository, you may want to create a separate bucket where you can store a tarball of your application code, which will be used by your Application Servers to retrieve your web application.
Create an S3 bucket which you will use to store a mysql dump of your database.
Go to Clouds > AWS Global > S3 Browser. Click New.
Click Create.
(Optional) If you are going to pull your application code from an S3 bucket instead of from an SVN repository, create a second bucket for your application code. (e.g. myproject-app)
You should now see your new S3 buckets listed.
The next step is to upload files to your S3 Bucket(s). Click on the bucket name text link.
Use the Browse tool to upload a file to the S3 bucket. After you successfully upload a file, refresh the browser window so that the file will be listed. By default, each file that is uploaded will have its permissions set to 'private'.
A 'private' file will only be accessible to resources of the same AWS Account. In order to retrieve a 'private' file, you will need to pass your AWS Access Key ID and AWS Secret Access Key. (In future tutorials, where a script is run on a Server to retrieve an object in an S3 bucket, Credentials that RightScale has automatically created for your account (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) will be used for retrieval validation purposes.)
If you're dealing with a dump of your database, you'll probably want to keep it 'private' but you may want to make other objects available to the public.
If you want an object to be publicly accessible, you must change its ACP permissions from 'private' to 'public' by selecting the object's checkbox under the Actions column, choosing the desired file permissions (for this tutorial, set public-read), and clicking Apply. You can then provide users with the 'url' link to access the file. (e.g. https://myproject-db.s3.amazonaws.co...00804161345.gz)
Congratulations! You now have an S3 bucket that contains a dump of your MySQL database that will be a requirement for completing one of the MySQL Database Setups tutorials.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.