Some notes for future me the next time I need to do this again.
Create amazon webservice account
Goto management console
Click on S3 for storage.
Create a new bucket
Create any directories you want
Upload your resource
Upload resource into your bucket
https://console.aws.amazon.com/s3/home?region=us-west-2
Set content-type to audio/mpeg for video
If you try connecting to the link you just created
you will get an unauthorized error. That’s because unless open to everyone, only authorized users will be able to see.
To see what your authorized access link would look like, right click on your resource and select open.
That URL you see at the top of the new window (containing access AWSAccessKeyId) is what you’ll need to build as a link, so your users can click and watch your video.
https://s3.amazonaws.com/agilenutshell/video/Project+Status+Reports.mp4?AWSAccessKeyId=XXX
You need to build this link above, inserting your aws credentials.
So created your credentials, then build the link in rails (gist below).
Create security credentials
https://console.aws.amazon.com/iam/home#security_credential
https://portal.aws.amazon.com/gp/aws/securityCredentials (old)
Build link
https://gist.github.com/iwasrobbed/1032395
Filed under: programming, rails Tagged: amazons3, aws, rails
