Julia interface for Amazon Web Services.
This package provides core infrastructure functions and types.
The AWSSDK.jl package provides automatically generated low-level API wrappers for each operation in each Amazon Web Service.
The following high-level packages are also available: AWS S3, AWS SQS, AWS SNS, AWS IAM, AWS EC2, AWS Lambda, AWS SES and AWS SDB. These packages include operation specific result structure parsing, error handling, type convenience functions, iterators, etc.
Full documentation is available here, or see below for some examples of how to get started.
There are three ways to use AWSCore
:
- Call
AWSCore/Services.jl
functions directly:
using AWSCore.Services.cloudformation
cloudformation("CreateStack",
StackName = "mystack",
TemplateBody = readstring("cloudformation_template.yaml"),
Parameters = [["ParameterKey" => "Foo",
"ParameterValue" => "bar"]],
Capabilities = ["CAPABILITY_IAM"])
- Use the low-level
AWSSDK
wrappers:
using AWSSDK.S3.list_buckets
r = list_buckets()
buckets = [b["Name"] for b in r["Buckets"]["Bucket"]]
- Use one of the high-level convenience packages:
using AWSS3
buckets = s3_list_buckets()
Create an S3 bucket and store some data...
aws = aws_config()
s3_create_bucket(aws, "my.bucket")
s3_enable_versioning(aws, "my.bucket")
s3_put(aws, "my.bucket", "key", "Hello!")
println(s3_get(aws, "my.bucket", "key"))
Post a message to a queue...
q = sqs_get_queue(aws, "my-queue")
sqs_send_message(q, "Hello!")
m = sqs_receive_message(q)
println(m["message"])
sqs_delete_message(q, m)
Post a message to a notification topic...
sns_create_topic(aws, "my-topic")
sns_subscribe_sqs(aws, "my-topic", q; raw = true)
sns_publish(aws, "my-topic", "Hello!")
m = sqs_receive_message(q)
println(m["message"])
sqs_delete_message(q, m)
Start an EC2 server and fetch info...
ec2(aws, "StartInstances", {"InstanceId.1" => my_instance_id})
r = ec2(aws, "DescribeInstances", {"Filter.1.Name" => "instance-id",
"Filter.1.Value.1" => my_instance_id})
println(r)
Create an IAM user...
iam(aws, "CreateUser", {"UserName" => "me"})