IAM Roles with AWS Java SDK

Posted on Tuesday, November 20, 2012



Overview


In June of 2012 Amazon AWS introduced Roles with the IAM (Identity and Access Management) tool.   You can see their blog post and a short video covering its user here http://aws.typepad.com/aws/2012/06/iam-roles-for-ec2-instances-simplified-secure-access-to-aws-service-apis-from-ec2.html [1]

In a nutshell
1.     Create a Role within IAM
2.     Set that roles policies
3.     Create an EC2 instance with this role assigned to it  (must do at creation cannot do after the fact)

That is it,   now your EC2 machine has access to metadata that allows it to access this role and its permissions.    In theory it could work with things like s3cmd or s3fs but as of this writing I do not think those tools have been updated to take advantage of this feature.   The Amazon provided SDKs can take advantage of this, so that is what I will cover here.


Setting up IAM user with limited Web Console Access

Posted on Sunday, November 18, 2012


Create an IAM user



















Click on My Account/Console à AWS management Console


Reading S3 via s3fs from Ubuntu 12.04 EC2 instance

Posted on Wednesday, November 14, 2012


Getting EC2 to read S3




I have a simple need to be able to read/write data at my S3 from an EC2 instance.   You would think there would be a nice simple way of doing that, like allowing EC2 instances with a certain (ec2) security group have permissions to a bucket or a folder in a bucket of S3.  But there is not, at least not from what I can see.   The good news is there is a way to do this, but its more complex and it gives you a lot more tools than you could ask for.

So with that let’s start diving into it all…

Reading S3 via s3cmd from Ubuntu 12.04 EC2 instance

Posted on Friday, November 9, 2012


Getting EC2 to read S3



I have a simple need to be able to read/write data at my S3 from an EC2 instance.   You would think there would be a nice simple way of doing that, like allowing EC2 instances with a certain (ec2) security group have permissions to a bucket or a folder in a bucket of S3.  But there is not, at least not from what I can see.   The good news is there is a way to do this, but its more complex and it gives you a lot more tools than you could ask for.

So with that let’s start diving into it all…

Alfresco 4 Customize inbound email handler

Posted on Thursday, November 1, 2012



This document shows how to override the default Alfresco email handler.   This document assumes you already have Alfresco 4.0 Community Edition installed you have inbound email already configured.

If you do not have this done you can look at my other guide Alfresco_4_Install_on_ubuntu_12_04_and_make_folder_emailable

For this particular install I am using Alfresco 4.0.e on Ubuntu 12.04


Why?


Why would you want to override the default inbound email handler? 

Well, I am sure you can think of many reasons, for me I had a project for a company that would forward emails from gmail and send them all to the same folder.  The custom email handler would check for an attachment and based on its name save it to a different folder.   Also it only saved the attached file and not the email itself.