Git Product home page Git Product logo

aws-sdk-lisp's People

Contributors

fiddlerwoaroof avatar fukamachi avatar junker avatar waku893 avatar wogac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-sdk-lisp's Issues

Code generator for services needs an explicit :USE subform

This DEFPACKAGE form generates potentially noncoforming code for the various services:

`(defpackage ,package-name
(:nicknames ,(make-symbol (format nil "~:@(~A/~A~)" :aws service)))
(:import-from #:aws-sdk/generator/shape)
(:import-from #:aws-sdk/generator/operation)
(:import-from #:aws-sdk/api)))

As the standard says:

:use
The arguments to :use set the packages that the package named by package-name will inherit from. If :use is not supplied, it defaults to the same implementation-dependent value as the :use argument to make-package.

To ensure that no packages are used, you have to do something like:

(defpackage ,package-name
  (:use))

http://www.lispworks.com/documentation/HyperSpec/Body/m_defpkg.htm#defpackage

This actually causes issues on lispworks.

Generated code for `list-buckets` is wrong

It mistakenly passes a cons instead of an alist for a parameter.

code

(common-lisp:defun list-buckets ()
   (aws-sdk/generator/operation::parse-response
    (aws-sdk/api:aws-request :service "s3" :method :get :params
                             (common-lisp:cons "Action" "ListBuckets"))
    "ListBucketsOutput" common-lisp:nil))

This

(common-lisp:cons "Action" "ListBuckets")

should be

(common-lisp:list (common-lisp:cons "Action" "ListBuckets"))

Requests not being signed correctly

This call fails with an error saying that the signature provided in the Authorization header didn't match the signature Amazon computed:

(aws-sdk/services/cloudformation:list-stacks 
 :stack-status-filter '("UPDATE_COMPLETE" "UPDATE_IN_PROGRESS"
                        "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" "UPDATE_ROLLBACK_COMPLETE"
                        "UPDATE_ROLLBACK_IN_PROGRESS" "UPDATE_ROLLBACK_FAILED" 
                        "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS" "CREATE_FAILED"
                        "CREATE_COMPLETE" "CREATE_IN_PROGRESS"))

I think this PR fixes it upstream: rotatef/aws-sign4#6, I'm just reporting this here in case that PR doesn't get merged.

Custom value in aws-sdk:*aws-profile* ignored

I'm trying to specify the profile in my ~/.aws/credentials file that I'd like to use, but it seems to be ignored in favour of default.

Am I doing this the wrong way, or is this unsupported?

CL-USER> (ql:quickload :ironclad)
(:IRONCLAD)
CL-USER> (ql:quickload :aws-sdk)
(:AWS-SDK)
CL-USER> (setq aws-sdk:*aws-profile* "foo")
"foo"
CL-USER> (ql:quickload :aws-sdk/services/s3)
(:AWS-SDK/SERVICES/S3)
Profile 'default' doesn't exist in '~/.aws/credentials'.
   [Condition of type SIMPLE-ERROR]
CL-USER> aws-sdk:*aws-profile*
"foo"

The profile definitely exists:

[foo]
aws_access_key_id = REDACTED
aws_secret_access_key = REDACTED
region = ap-southeast-2

How do I pass a boolean true value

Calling

(aws/ssm:get-parameter
 :name "FOO"
 :with-decryption t)

results in

The value of QURI.ENCODE::VALUE is T, which is not of type (OR
                                                            STRING
                                                            NUMBER
                                                            (SIMPLE-ARRAY
                                                             (UNSIGNED-BYTE
                                                              8)
                                                             (*))).

If I pass a non-boolean values, such as "1", I get an error that I'm not passing a boolean.

Can't regenerate all services with lake

I'm trying to regenerate all AWS SDK services with lake:

CL-USER> (swank:set-default-directory "/usr/home/duncan/code/aws-sdk-lisp/")
"/usr/home/duncan/code/aws-sdk-lisp/"
CL-USER> (ql:quickload "lake")
To load "lake":
  Load 1 ASDF system:
    lake
; Loading "lake"
("lake")
CL-USER> (lake:lake)

This runs the default task, but that immediately produces the following error:

System "aws-sdk/generator" not found
   [Condition of type QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]

Must I install the lake binary using Roswell and regenerate services that way? Or is there a way of making this work from the REPL that I don't know?

Cannot DEFTYPE TYPE because TYPE has been declared as a declaration name

Compilation is currently failing:

CL-USER> (ql:quickload :ironclad)
(:IRONCLAD)
CL-USER> (ql:quickload :aws-sdk)
(:AWS-SDK)
CL-USER> (setq aws-sdk:*aws-profile* "bayne-family")
"bayne-family"
CL-USER> (ql:quickload :aws-sdk/services/s3)
To load "aws-sdk/services/s3":
  Load 1 ASDF system:
    aws-sdk/services/s3
; Loading "aws-sdk/services/s3"
[package aws-sdk/services/s3].....................
..................................................
..................................................
......
Cannot DEFTYPE TYPE because TYPE has been declared as a declaration name
   [Condition of type SIMPLE-ERROR]

Backtrace:
  0: (CCL::CHECK-DECLARATION-REDEFINITION TYPE DEFTYPE)
  1: (CCL::%DEFTYPE TYPE #<Compiled-function TYPE (Non-Global)  #x30200409BA6F> NIL)
  2: (CCL::%COMPILE-TIME-EVAL (CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA (#:WHOLE27721 #:ENVIRONMENT27722) (DECLARE #) (BLOCK TYPE #))) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D>)
  3: (CCL::FCOMP-FORM-1 (CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA (#:WHOLE27721 #:ENVIRONMENT27722) (DECLARE #) (BLOCK TYPE #))) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :COMPILE-TIME-TOO)
  4: (CCL::FCOMP-FORM (CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA (#:WHOLE27721 #:ENVIRONMENT27722) (DECLARE #) (BLOCK TYPE #))) NIL) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :COMPILE-TIME-TOO)
  5: (CCL::FCOMP-FORM-LIST ((CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA # # #)) NIL)) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :COMPILE-TIME-TOO)
  6: (CCL::FCOMP-EVAL-WHEN (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA # # #)) NIL)) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPILE-TIME)
  7: (CCL::FCOMP-FORM (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (CCL::%DEFTYPE 'TYPE (NFUNCTION TYPE (LAMBDA # # #)) NIL)) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPILE-TIME)
  8: (CCL::FCOMP-FORM-LIST ((EVAL-WHEN (:COMPILE-TOPLEVEL) (CCL::NOTE-TYPE-INFO 'TYPE 'CCL::MACRO #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D>)) ..)) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPILE-T..
  9: (CCL::FCOMP-FORM (PROGN (EVAL-WHEN (:COMPILE-TOPLEVEL) (CCL::NOTE-TYPE-INFO 'TYPE 'CCL::MACRO #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D>)) ..) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPILE-T..
 10: (CCL::FCOMP-FORM (DEFTYPE TYPE () 'STRING) #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPILE-TIME)
 11: (CCL::FCOMP-READ-LOOP "/usr/home/duncan/common-lisp/aws-sdk-lisp/services/s3.lisp" "/usr/home/duncan/common-lisp/aws-sdk-lisp/services/s3.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D> :NOT-COMPIL..
 12: (CCL::FCOMP-FILE "/usr/home/duncan/common-lisp/aws-sdk-lisp/services/s3.lisp" "/usr/home/duncan/common-lisp/aws-sdk-lisp/services/s3.lisp" 0 #<CCL::LEXICAL-ENVIRONMENT #x3020036FAF9D>)

System details:

  • FreeBSD 11.1-RELEASE amd64
  • Clozure Common Lisp v1.11.5 (FreebsdX8664)
  • roswell 18.3.10.89(bfd0950)
  • ASDF 3.1.5

aws/lambda:create-function puts parameters into URI instead of payload

This is what hits me first when I try to use aws/lambda, the problem is probably present for other related functions too.

According to https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html, CreateFunction should not use any URI parameters, and all data should be JSON-encoded in HTTP payload. However, aws-sdk-lisp put everything in URI parameters. This generates a 414 URI too large error when submitting a ZipFile with size in the MBs, and will probably not function even if the ZipFile is small enough.

ec2 doesn't work with :filters parameter

Consider the following request:

(aws/ec2:describe-instances :filters (list (aws/ec2:make-filter :name "filter-1"
                                                                :values (list "val-1" "val-2"))
                                           (aws/ec2:make-filter :name "filter-2"
                                                                :values (list "val-3"))))

An error occurs:

;; sbcl
The value of QURI.ENCODE::VALUE is #S(AWS-SDK/SERVICES/EC2/API:FILTER
                                      :NAME "filter-1"
                                      :VALUES ("val-1" "val-2")), which is not of type (OR
                                                                                        STRING
                                                                                        NUMBER
                                                                                        (SIMPLE-ARRAY
                                                                                         (UNSIGNED-BYTE
                                                                                          8)
                                                                                         (*))).
   [Condition of type SIMPLE-TYPE-ERROR]

After some investigation, it seems that ec2-request is not generated properly when :filters argument is presented.
The generated request has following request-params:

(("Action" . "DescribeInstances") ("Version" . "2016-11-15")
 ("Filters.member.1"
  . #S(AWS-SDK/SERVICES/EC2/API:FILTER
       :NAME "filter-1"
       :VALUES ("val-1" "val-2")))
 ("Filters.member.2"
  . #S(AWS-SDK/SERVICES/EC2/API:FILTER :NAME "filter-2" :VALUES ("val-3"))))

instead of something like this:

(("Action" . "DescribeInstances") ("Version" . "2016-11-15")
 ("Filters.member.1.Name" . "filter-1")
 ("Filters.member.1.Values.member.1" . "val-1")
 ("Filters.member.1.Values.member.2" . "val-2")
 ("Filters.member.2.Name" . "filter-2")
 ("Filters.member.2.Values.member.1" . "val-3"))

XMLS update

Hi, XMLS:PARSE now produces structures instead of lists. So, all the AWS calls fail. It's possible to fix this by replacing XMLS:PARSE with XMLS:PARSE-TO-LIST in operation.lisp. However, it might make more sense to rewrite the relevant parts to use the new api?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.