Use Java 8, Ant and AWS Lambda to create a scheduled task in the cloud.
Java
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7691c89 Mar 3, 2018
Permalink
Failed to load latest commit information.
lib First commit, all files. Jul 24, 2016
resources First commit, all files. Jul 24, 2016
src/com/samueltoepke First commit, all files. Jul 24, 2016
README.md Cleanup. Mar 3, 2018
build.xml First commit, all files. Jul 24, 2016

README.md

AWS_Lambda_HelloWorld

Amazon AWS provides Lambda as its 'code in the cloud' solution. In this example we will use Ant to create a HelloWorld .jar file.

The file can be uploaded and run in Lambda using CloudWatch to affect a scheduled task. The code will print out to logs the source trigger as well as the current time.

Java and Ant need installed/configured/set-up properly.

SOFTWARE:

EXECUTION:

  • All possible targets are in the ./build.xml file.
  • "$ ant" # Fully build the code.

Full instructions can be found here: http://www.samueltoepke.com/amazon-aws-java-and-lambda/

ROLE POLICY DOCUMENT: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:::*" } ] }

TEST EVENT: { "account": "123456789012", "region": "us-east-1", "detail": {}, "detail-type": "Scheduled Event", "source": "aws.events", "time": "1970-01-01T00:00:00Z", "id": "cdc73f9d-aea9-11e3-9d5a-835b769c0d9c", "resources": [ "arn:aws:events:us-east-1:123456789012:rule/my-schedule" ] }