Posts

Showing posts with the label AWS EC2

AWS API Usage in Elisp

Image
Here's some sample elisp code for signing Amazon Web Services (AWS) API requests . The value (first element) returned by (aws-sign4) is used in Authorization header while making a request. When the function is called with an expires value, it returns a URL which can be directly used in a browser. (require 'aws-sign4)   (let ((*aws-credentials*        (lambda ()          (values "AKIAIOSFODNN7EXAMPLE" "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"))))   (aws-sign4 :region "eu-west-1"              :service "s3"              :host "s3-eu-west-1.amazonaws.com"              :path "/some-bucket/some-file"              ))   (let ((*aws-credentials*      ...