Questions tagged [amazonica]

A comprehensive Clojure client for the entire Amazon AWS api.

From Amazonica's GitHub page:

Amazonica reflectively delegates to the Java client library, as such it supports the complete set of remote service calls implemented by each of the service-specific AWS client classes (e.g. AmazonEC2Client, AmazonS3Client, etc.), the documentation for which can be found in the AWS Javadocs.

Reflection is used to create idiomatically named Clojure Vars in the library namespaces corresponding to the AWS service. camelCase Java methods become lower-case, hyphenated Clojure functions.

13 questions
9
votes
1 answer

"The conditional request failed" whereas the condition works

I am using Amazonica, a Clojure library to write to DynamoDB. The following inserts an item into DynamoDB and updates its content if called a second time, which is expected. (ddb/put-item cred :table-name table-name :item payload) Now, the…
6
votes
2 answers

How to set S3 path style in Clojure using Amazonica library?

I'm a Ruby dev moving over to Clojure and I'm having trouble understanding how to translate the following Java call into Clojure based on the conventions used in the Clojure library Amazonica. AmazonS3 client = new…
Integralist
  • 5,899
  • 5
  • 25
  • 42
4
votes
1 answer

How do you specify an ACL policy when creating an S3 signed URL with Clojure's Amazonica?

I'm trying to make an upload have an ACL of public-read. The docs are super thin for Amazonica, and after hours of tinkering, I'm no closer to figuring out how to accomplish this goal. In short, I can't figure out how to get it to sign the header.…
user10682913
3
votes
0 answers

Wait for amazonica S3 copy to complete

I need to copy an object between two S3 buckets in different regions. The object is large enough that amazonica.aws.s3/copy-object fails with the following: AmazonS3Exception The specified copy source is larger than the maximum allowable size for…
Vebjorn Ljosa
  • 17,438
  • 13
  • 70
  • 88
3
votes
1 answer

How do I set a timeout when getting an object from S3 with Amazonica?

I use Amazonica to download an object from S3: (require '[amazonica.aws.s3 :as s3]) (s3/get-object "my-bucket" "foo") However, sometimes the download hangs. How can I set a timeout?
Vebjorn Ljosa
  • 17,438
  • 13
  • 70
  • 88
3
votes
2 answers

Idiomatic way to proxy named parameters in Clojure

I need a function that thinly wraps amazonica's sqs/receive-message in order to add a default wait time. The function requires a queue URL, and then accepts any number of optional named parameters, which should be passed along to sqs/receive-message…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
2
votes
1 answer

Connect to in-process DynamoDBLocal via Amazonica or Cognitect AWS API?

Current situation: Clojure code -> Amazonica -> AWS Java SDK -> Standalone DynamoDBLocal.jar in background process over HTTP. Desired situation: Clojure code -> Amazonica -> AWS Java SDK -> In-process DynamoDB local I managed to get the in-process…
2
votes
1 answer

How should I format data for a Kinesis event when using Amazonica in Clojure?

When I put an event into a stream using the AWS CLI, I can pass JSON in and get it back out, after decoding from base64. When I try to put an event using Amazonica, from Clojure, I am having a hard time formatting the event data parameter correctly…
Dan Ross
  • 3,596
  • 4
  • 31
  • 60
2
votes
2 answers

How to create an AWS Lambda function from a Clojure project or a jar?

The Amazonica test for the AWS Lambda API (link) shows a simple example of creating a Lambda function from a Javascript blob (role is an ARN string for a role that can create Lambdas): (def handler "exports.helloWorld = function(event, context) { …
Dan Ross
  • 3,596
  • 4
  • 31
  • 60
2
votes
0 answers

generate a Cloudfront Signed URL using Clojure

Is there an easy way to generate a Cloudfront Signed URL in Clojure? I'm using Amazonica for S3 (which works great): (s3/set-s3client-options {:path-style-access true}) (aws/defcredential s3_accesskey s3_secretkey) (s3/generate-presigned-url bucket…
2
votes
1 answer

assign tag and public for instance via amazonica

I'm using amazonica to create an ami and then launch an instance from the ami when it's ready. The problem I'm having with amazonica is that it has about zero documentation (that I can find), apart from what's on readme. And what's on ready is very…
LocustHorde
  • 6,361
  • 16
  • 65
  • 94
1
vote
1 answer

How do I fix this dependency issue in Clojure?

I'm having a lot of trouble fixing an issue where the dependencies for two different packages are colliding. My project.clj's dependencies look like this: :dependencies [[org.clojure/clojure "1.6.0"] [itsy "0.1.1"] …
user592419
  • 5,103
  • 9
  • 42
  • 67
0
votes
1 answer

How do I fetch the hourly average CPUUtilization for my cluster?

I would like to be able to fetch the hourly average CPUUtilization for my cluster. But using amazonica I get this error: com.amazonaws.services.cloudwatch.model.InvalidParameterValueException: The parameter StartTime must not equal parameter…
Freid001
  • 2,580
  • 3
  • 29
  • 60