The AWS SDK Plugin allows your Grails application to use the Amazon Web Services infrastructure services.
The aim is to provide a lightweight amazonWebService Grails service wrapper around the official AWS SDK for Java.
The AWS SDK for Java provides a Java API for AWS infrastructure services, making it even easier for developers to build applications that tap into the cost-effective, scalable, and reliable AWS cloud.
The Grails plugin handles :
- convenient Grails configuration/management of all AWS API clients for each AWS region,
- easy access to all AWS API java clients through the amazonWebService Grails service wrapper.
Declare the plugin dependency in the BuildConfig.groovvy file, as shown here:
grails.project.dependency.resolution = {
inherits("global") { }
log "info"
repositories {
//your repositories
}
dependencies {
// Workaround to resolve dependency issue with aws-java-sdk and http-builder (dependent on httpcore:4.0)
build 'org.apache.httpcomponents:httpcore:4.1'
build 'org.apache.httpcomponents:httpclient:4.1'
runtime 'org.apache.httpcomponents:httpcore:4.1'
runtime 'org.apache.httpcomponents:httpclient:4.1'
}
plugins {
//here go your plugin dependencies
runtime ':aws-sdk:1.3.22'
}
}
Create an AWS account Amazon Web Services, in order to get your own credentials accessKey and secretKey.
Add your AWS credentials parameters to your grails-app/conf/Config.groovy:
grails.plugin.awssdk.accessKey = {ACCESS_KEY}
grails.plugin.awssdk.secretKey = {SECRET_KEY}
Project documentation is located here:
AWS SDK for Java documentation is located here:
AWS clients supported by AWS SDK for Java:
- Amazon CloudFormation
- Amazon CloudFront
- Amazon CloudSearch
- Amazon CloudWatch
- Amazon DynamoDB
- Amazon Elastic Compute Cloud (EC2)
- Amazon Elastic MapReduce
- Amazon ElastiCache
- Amazon Glacier
- Amazon Relational Database Service (RDS)
- Amazon Route 53
- Amazon Simple Storage Service (S3)
- Amazon Simple Email Service (SES)
- Amazon SimpleDB
- Amazon Simple Notification Service (SNS)
- Amazon Simple Queue Service (SQS)
- Amazon Simple Workflow (SWF)
- Auto Scaling
- AWS Elastic Beanstalk
- AWS Identity & Access Management (IAM)
- AWS Import/Export
- AWS Storage Gateway
- Elastic Load Balancing
- 2012-10-06 V1.3.22 : AWS SDK for Java updated to V1.3.22 + S3 transfer manager support added (for async upload/download and multiple files upload/download)
- 2012-09-27 V1.3.21 : AWS SDK for Java updated to V1.3.21.1 + Amazon Glacier support added
- 2012-07-04 V1.3.12 : AWS SDK for Java updated to V1.3.12
- 2012-07-02 V1.3.11 : initial release
To report any bug, please use the project Issues section on GitHub.
This is an alpha release.
FYI, there is another great Grails AWS plugin with a different approach: its aim is to provide an easy "groovy" access to SES (through a groovy DSL) and S3 (through methods injection), based on JetS3 java lib. If you just need basic SES or S3 features, you might give it a try.
We decided to write our own AWS plugin because it did not meet our requirements:
- direct access to ALL AWS SDK for Java features including ALL AWS services, with custom client configuration,
- only AWS SDK for Java with a consistent way to access ALL AWS services,
- fast release update with 100% compatibility with AWS SDK for Java, as it is just a simple lightweight wrapper around the official java clients,
- no need for additional DSL/methods injection, since we found the AWS SDK for Java clients pretty straightforward to use