Skip to content
Base routines for AWS services
Branch: master
Clone or download
Latest commit 7b8c66b May 8, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore first commit May 8, 2018
LICENSE first commit May 8, 2018 first commit May 8, 2018
aws-foundation.lisp first commit May 8, 2018
package.lisp first commit May 8, 2018

###aws-foundation: A Common Lisp Interface to Amazon AWS Services.

The primary purpose of this libary is provide support for access to Amazon services, such as Cognito or Transcribe.

aws4-post (service region target content &key (access-key nil) (secret-key nil) (the-time (local-time:now)))

	=> result, code, response
	aws4-post signs and sends a request to Amazon.
	On error, **result** is nil.
	**code** is the HTTP response code.
	On success, **response** is nil.  On error, **response** is the decoded JSON response provided by Amazon.
		(aws-foundation:aws4-post "cognito-idp" "us-east-1"
		                          `(("UserPoolId" . ,pool-id)
		                          ,@(if pagination-token `(("PaginationToken" . ,pagination-token))))
		                          :access-key access-key
		                          :secret-key secret-key))
		(aws-foundation:aws4-post "transcribe" "us-east-1"
		                          `(("LanguageCode" . ,language-code)
		                            ("Media" . (("MediaFileUri" . ,url)))
		                            ("MediaFormat" . ,media)
		                            ("MediaSampleRateHertz" . ,sample-rate)
		                            ("TranscriptionJobName" . , job-name))
		                           :access-key access-key
		                           :secret-key secret-key))

aws-get (url_s &key (headers nil))

	=> result, code, response

	Constructs and makes an http GET request and decodes the result using Amazon conventions (JSON error
	responses, for example).

region/s (pool-id)

	Returns the region portion of a pool id.
	(region/s "us-east-1_abcdefghi") -> "us-east-1"

pool/s (pool-id)

	Returns the pool portion of a pool id.
	(region/s "us-east-1_abcdefghi") -> "abcdefghi"

string-to-octets (string)

	Converts string to a vector of octets using utf-8 encoding.

sha256/ba (vector)

	Create a sha256 digest of the vector of octets

sha256/hs64 (vector)

	Create a 64 character string, padded with '0' on the left, of the sha256 digest of the vector of octets

HTTP engine

Dexador is used to process HTTPS requests. The code encapsulates this in two functions, aws-post and aws-get, so it would be easyto use Drakma, instead.


####License aws-foundation is available under a BSD-like license. See the file LICENSE for details.


For any questions or comments, please feel free to email me, Bob Felts

You can’t perform that action at this time.