aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
thomascothran 2020-07-10T00:26:28.335Z

I'm using aws-api with MediaConvert. After using aws/validate-requests, I get an error:

{ ...
   :path
   [:Settings
    :OutputGroups
    :OutputGroupSettings
    :FileGroupSettings
    :Destination],
   :pred
   (clojure.core/fn
    [%]
    (clojure.core/re-matches (clojure.core/re-pattern "^s3:\\/\\/") %)),
   :val "<s3://bucket-name/somename/>"
   ...
   }
The :Destination value here will only match the string "s3://". However, this is https://docs.aws.amazon.com/mediaconvert/latest/ug/specify-output-groups.html. I can use MediaConvert (outside aws-api) with the rejected value and it works. Is this likely a bug or might I be overlooking something?

ghadi 2020-07-10T00:28:08.335400Z

what :op ?

thomascothran 2020-07-10T00:28:52.335600Z

:CreateJob

ghadi 2020-07-10T00:29:43.336Z

do you mind filing a bug for that at cognitect-labs/aws-api ?

ghadi 2020-07-10T00:30:25.336700Z

offhand, it looks like the spec is using re-matches instead of re-find

ghadi 2020-07-10T00:31:16.337700Z

(most regexes in the APIs descriptors have ^ and $ anchors, but not this one for :CreateJob)

ghadi 2020-07-10T00:31:50.338500Z

as a workaround you could maybe redefine the spec to be a little looser @thomas559

ghadi 2020-07-10T00:32:25.339200Z

ghadi 2020-07-10T00:32:38.339800Z

some other regexes from the MediaConvert API descriptors...

ghadi 2020-07-10T00:33:19.340600Z

most have the ^ $ anchors

ghadi 2020-07-10T00:33:33.341Z

heh that name "__stringPatternArnAwsUsGovCnKmsAZ26EastWestCentralNorthSouthEastWest1912D12KeyAFAF098AFAF094AFAF094AFAF094AFAF0912"

thomascothran 2020-07-10T00:37:14.342500Z

Thanks, @ghadi. I'll file the issue. The spec part is a little opaque to me (not spec as a library, just where they are being defined by aws-api), but I'll take a look and see if I can figure it out.

ghadi 2020-07-10T00:39:05.343Z

The specs are mechanically generated @thomas559

ghadi 2020-07-10T00:39:38.343700Z

We’ll have to analyze it some more and maybe modify the generator

ghadi 2020-07-10T00:39:47.344Z

(Which isn’t public)

thomascothran 2020-07-10T00:45:03.346400Z

That's the part where I get lost a little, since normally I'd look for a spec (e.g., :a/b ) in the source and override it. Here I'm not sure where to look for the name

ghadi 2020-07-10T00:52:37.348700Z

Check (aws/doc client :CreateJob) and see if you can navigate through the specs

thomascothran 2020-07-10T01:09:08.350400Z

Thanks, I was able to redefine the spec. In general, having the validation function is enormously useful for something like MediaConvert where the request can be a really big map.