1) set up an aws account
I am in the train today but I’ll send you examples at the end of the day
Dont Forget to add few € for your lambda
Oh, I have an AWS account with around 15k credit (due to a startup incubator.)
My copy of "AWS Lambda in Action" just arrived today.
Lol
I'm also familiar with EC2 / Beanstalk / AuroraDB ... it's just Lambda that I'm new to.
Then, just try the hello word example
defn a hello-word that send back the string
I guess I was hoping to see a "Lambda/Portkey cookbook" -- and see if I can turn my entire server side serverless.
And mount it
I can already drop websocket needs -- so in theory, lambda + Aurora + Dynamo + S3 should be all I need.
Also, want to hear the most badass first sentence intro to a book? (technically part of the 'Foreword'):
It will package everything needed to make it run on a lambda, you can also access it with the api-gateway url that the function returns
Lol, go on!
Alright, I guess your suggestion is: 1. get the most basic hedllo world working 2. start porting app over 3. if something breaks, ask for help ?
Quote: Foreword: Page xv (first real sentence of the book) At some point in the next few years we're going to see the first billion-dollar startup with a single employee, the founder, and taht engineer will be using serverless technology. -- after that sentence, this became the first book where I read the foreword, preface, acknowledgement, and 'about this book' in great detail
Yes, get the hello world working, define what you want to do with your lambda, and really don’t hesitate to ping
@baptiste-from-paris: I have the following problem 1. I did lein install 2. I added "portkey-0.1.0-SNAPSHOT" to my boot.build 3. I can require portkey.ouroboros, but I can't require portkey.core (ns server.snip.aws (:require [portkey.ouroboros] #_ [portkey.core :as pk])) 4. When I try to require portkey.core, I get an error of:
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling portkey/core.clj at (1:1)
1. Caused by java.lang.Exception
namespace 'portkey.ouroboros' not found
You don’t need to require ouroboros
If you try only portkey core?
yeah, it gives me the exact same error (which is way I tried to see if I could require portkey.ouroboros on my own)
(ns server.snip.aws
(:require [portkey.core :as pk]))
results in error:
1. Caused by java.lang.Exception
namespace 'portkey.ouroboros' not found
It shouldn’t change anything but can you try from a lein template ?
is there a way I can run directly from the github repo I cloned of portkey? I get that you want to test boot vs lein, but I happen to know little lein.
I think you could as long as ouriboros eat itself, but it will be only in the repl
I'm perfectly willingto run the test to see if it works in lein,
but I don't know how to setup a lein template, so I'm asking if there is som existing repo I can clone
to see if portkey+lein works on my mchine
Lein new app-name
Minimal template
Then in project.clj your dependencies
And that’s it
okay, running lein repl
user=> (require 'portkey.core)
Preparing for self instrumentation.
Ouroboros succesfully eating its own tail!
Instrumenting clojure.lang.Var... done!
CompilerException java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath., compiling:(portkey/aws.clj:1:1)
Try with clojure 1.9.
In your project template
Lein clean
Lein deps
should I change this liunein project.clj too? :dependencies [[org.clojure/clojure "1.8.0"]
That’s what I was trying to say ^_^
yeah, -alpha17
user=> (require 'portkey.core)
Preparing for self instrumentation.
Ouroboros succesfully eating its own tail!
Instrumenting clojure.lang.Var... done!
WARNING: get-method already refers to: #'clojure.core/get-method in namespace: portkey.aws.apigateway, being replaced by: #'portkey.aws.apigateway/get-method
nil
I think that means require portkey.core success ?
trying from boot repl:
(require 'portkey.core)
java.lang.Exception: namespace 'portkey.ouroboros' not found
clojure.lang.Compiler$CompilerException: java.lang.Exception: namespace 'portkey.ouroboros' not found, compiling:(portkey/core.clj:1:1)
Yes, it should be good
=== this makes no sense ===
boot.user> (require 'portkey.ouroboros)
nil
boot.user> (require 'portkey.core)
java.lang.Exception: namespace 'portkey.ouroboros' not found
clojure.lang.Compiler$CompilerException: java.lang.Exception: namespace 'portkey.ouroboros' not found, compiling:(portkey/core.clj:1:1)
boot.user>
if I reuiqre portkey.ouroboros manually, it works fine, but if I require portkey.core, there's an error loading portkey.ouroboroswhat is ouroboros anyway? I'm googling, and it sounds like a JVM in a JVM ?
It creates an agent that is attached to the current running VM in order to do some instrumentation of bytecode
Have you got the hello world running with lein ?
no, I was hoping to get portkey.core working in boot first
I don't have AWS IAM setup either yet.
Ok
I remember that we have an issue for getting started https://github.com/portkey-cloud/portkey/issues/30