This is growing out of date. Version 3 of the AWS SDK is out now and there should be suitable samples for using it, especially since it's own documentation is very incomplete at present.