portkey 2018-03-27

peeks and sees HTTP header parser in the works

hmm, put up a branch for reading models from a maven artifact

thinkin that could merge it to master

hmm, not, missed how src/portkey/aws/lambda.clj is generated

ah, missed this if:

(if version
                          [(java.io.File. (str “src/portkey/aws/” apifile “/_” version “.clj”))
                           (symbol (str “portkey.aws.” apins “.-” version))]
                          [(java.io.File. (str “src/portkey/aws/” apifile “.clj”))
                           (symbol (str “portkey.aws.” apins))])

there's only one version in aws-java-sdk-models

thinking out loud

why I got here was that wanted to create lambda with current max memory limit (3008MB) :)

does it work?

user=> (lambda/create-function {:function-name “testing” :runtime “java8" :handler “com.example.myapp” :memory-size 3008 :role “arn:aws:iam::262355063596:role/portkey” :code {:s3-bucket “tiuhti-portkey” :s3-key “myapp.zip”}})
{:role “arn:aws:iam::262355063596:role/portkey”, :description “”, :revision-id “52694660-d403-4999-a8e6-564f0e5cf1ff”, :code-size 4373063, :function-arn “arn:aws:lambda:eu-west-1:262355063596:function:testing”, :dead-letter-config {}, :master-arn nil, :last-modified “2018-03-27T15:22:22.200+0000”, :code-sha256 “V+BmqCrzvIiu0RfCbNqMWwKHN0ZM3J8FgHUve+9OnL8=“, :runtime :java8, :memory-size 3008, :vpc-config {}, :environment {}, :tracing-config {:mode :pass-through}, :timeout 3, :version “$LATEST”, :kmskey-arn nil, :handler “com.example.myapp”, :function-name “testing”}

have to learn more git magic to clean my working copy from generated files

while working on the generator, that is

succesfull run brings only new stuff working stuff

added lein gen-aws-api alias

many new API’s and changes to existing ones

30 new APIs since the last check?

reInvent happened between september and now

let’s hope they didn’t introduce new protocols

😅 1

hmm, might be that new APIs not fully generated

Encountered 8 errors while generating, failed for APIs: serverlessrepo, runtime.lex, apigateway, mq, medialive, mediaconvert, guardduty, mediapackage

should probably remove a file that encountered exception while printing to it

thinks how was it with pureness and side-effects

a pure program doesn’t even create files

we need heat here up north

portkey isn’t as hot as bitcoin mining though

🙂 you know your classics

learning 🙂

realising that gen-aws-api might remove existing API’s

deleted: src/portkey/aws/apigateway.clj

no one uses that!

apigateway? really? 🙂

might keep the old one

thinks again about pureness

well or just git not choose it

but off to the heat of sauna

bitcoin-heated sauna?

just traditional dumb heat for now

A sauna sounds nice...

it’s Finnish tradition to have one in every house

user=> (require '[portkey.aws.apigateway :as apigw])
nil
user=> (apigw/get-rest-apis)
{:items [{:created-date "2017-07-25T19:45:52Z", :id "04d57u6034", :name "portkey", :version "2018-03-23T19:15:08+02"} {:created-date "2017-10-01T17:12:42Z", :id "4jhj5avwn7", :name "lol", :version "2017-10-01T20:16:19+03"}]}

thinking I didn’t break stuff