All Projects → portkey-cloud → Portkey

portkey-cloud / Portkey

Live-coding the Cloud

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Portkey

Webiny Js
Enterprise open-source serverless CMS. Includes a headless CMS, page builder, form builder and file manager. Easy to customize and expand. Deploys to AWS.
Stars: ✭ 4,869 (+3402.88%)
Mutual labels:  serverless, cloud, aws-lambda, lambda
Aws Auto Cleanup
Open-source application to programmatically clean your AWS resources based on a whitelist and time to live (TTL) settings
Stars: ✭ 276 (+98.56%)
Mutual labels:  serverless, cloud, aws-lambda, lambda
Node Lambda Log
Basic logging mechanism for Node 6.10+ Lambda Functions
Stars: ✭ 115 (-17.27%)
Mutual labels:  serverless, cloud, aws-lambda, lambda
Chalice
Python Serverless Microframework for AWS
Stars: ✭ 8,513 (+6024.46%)
Mutual labels:  serverless, cloud, aws-lambda, lambda
Iopipe Js Core
Observe and develop serverless apps with confidence on AWS Lambda with Tracing, Metrics, Profiling, Monitoring, and more.
Stars: ✭ 123 (-11.51%)
Mutual labels:  serverless, aws-lambda, lambda
Lambda Refarch Webapp
The Web Application reference architecture is a general-purpose, event-driven, web application back-end that uses AWS Lambda, Amazon API Gateway for its business logic. It also uses Amazon DynamoDB as its database and Amazon Cognito for user management. All static content is hosted using AWS Amplify Console.
Stars: ✭ 1,208 (+769.06%)
Mutual labels:  serverless, aws-lambda, lambda
Aws Lambda Scala
Writing AWS Lambdas in Scala
Stars: ✭ 135 (-2.88%)
Mutual labels:  serverless, cloud, aws-lambda
Lambcycle
🐑🛵 A declarative lambda middleware with life cycle hooks 🐑🛵
Stars: ✭ 88 (-36.69%)
Mutual labels:  serverless, aws-lambda, lambda
Apex
Old apex/apex
Stars: ✭ 20 (-85.61%)
Mutual labels:  serverless, aws-lambda, lambda
Tensorflow Lambda Layer
Lets you import Tensorflow + Keras from an AWS lambda
Stars: ✭ 79 (-43.17%)
Mutual labels:  serverless, cloud, aws-lambda
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+7018.71%)
Mutual labels:  serverless, cloud, lambda
Serverless Node Simple Messaging
Simple email AWS lambda function
Stars: ✭ 75 (-46.04%)
Mutual labels:  serverless, aws-lambda, lambda
Serverless Node Simple Image Resize
Simple image resize AWS lambda function
Stars: ✭ 74 (-46.76%)
Mutual labels:  serverless, aws-lambda, lambda
Spark On Lambda
Apache Spark on AWS Lambda
Stars: ✭ 137 (-1.44%)
Mutual labels:  serverless, aws-lambda, lambda
Up
Up focuses on deploying "vanilla" HTTP servers so there's nothing new to learn, just develop with your favorite existing frameworks such as Express, Koa, Django, Golang net/http or others.
Stars: ✭ 8,439 (+5971.22%)
Mutual labels:  serverless, aws-lambda, lambda
Aws Serverless Airline Booking
Airline Booking is a sample web application that provides Flight Search, Flight Payment, Flight Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD. This web application was the theme of Build on Serverless Season 2 on AWS Twitch running from April 24th until end of August in 2019.
Stars: ✭ 1,290 (+828.06%)
Mutual labels:  serverless, aws-lambda, lambda
Serverless Sharp
Serverless image optimizer for S3, Lambda, and Cloudfront
Stars: ✭ 102 (-26.62%)
Mutual labels:  serverless, aws-lambda, lambda
Awesome Layers
λ A curated list of awesome AWS Lambda Layers. Sponsored by https://cloudash.dev
Stars: ✭ 1,655 (+1090.65%)
Mutual labels:  serverless, cloud, aws-lambda
Aws Lambda List
A list of hopefully useful AWS lambdas and lambda-related resources.
Stars: ✭ 130 (-6.47%)
Mutual labels:  serverless, aws-lambda, lambda
Corgi
AWS Lambda / API Gateway native, fast and simple web framework
Stars: ✭ 44 (-68.35%)
Mutual labels:  serverless, aws-lambda, lambda

Portkey

Live-coding the Cloud!

CircleCI

Portkey allows, at the REPL, to expose any function as an AWS Lambda.

Almost any inanimate object can be turned into a Portkey. Once bewitched, the object will transport anyone who grasps it to a pre-arranged destination.

The sensation of travelling by Portkey is universally agreed to be uncomfortable, if not downright unpleasant, and can lead to nausea, giddiness and worse.

(source)

Example

Live at the repl:

(defn flatter [name]
  (str name " is " (rand-nth ["incredible" "awesome" "fantastic"])))

(pk/mount! flatter "/hello?name={name}")
=> {:url "https://api-id.execute-api.region.amazonaws.com/hello"}

Go to "https://api-id.execute-api.region.amazonaws.com/hello?name=Rich" (and wait for the instance to start).

Usage

  1. Clone the repository and run lein install (portkey is still alpha so not on clojars yet).
  2. Add [portkey "0.1.0-SNAPSHOT"] to your project file.

Master plan

First steps:

  1. Borrow Ouroboros from Powderkeg (only class access matters, var tracking is irrelevant in a first time).
  2. Starting from a fn, serialize it using Kryo and a custom SerializerFactory to log all classes traversed during serialization. We also need to log all serialized vars.
  3. Serialize these vars values and keep going until there's no new var.
  4. Consider all classes encountered during steps 2 and 3.
  5. Visit their bytecode to find all references to other classes or vars.
  6. go to 3 until no new classes (somehow done but need to be smarter about common dynamicisms, provide good defaults)
  7. package them all
  8. send to the cloud!

Next steps:

  • Since we know the deps of the Lambda, we can redeploy it when a var change locally.
  • fdef specs could be leveraged to validate Lambda input.
  • var meta can provide hints for params naming.
  • support other backends than AWS Lambda
  • S3 buckets as Clojure references?
  • Track methods usage and narrow the deps graphs (bonus: remove unused methods from classes)
  • Once a fn is mounted we can automatically update it each time it or one of its direct or indirect deps change!
  • Add support for ring handlers

Requirements

The following AWS service actions are used by portkey, define them in for example an inline policy for a IAM user:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Resource": "*",
      "Action": [
        "lambda:GetPolicy",
        "lambda:GetFunction",
        "lambda:GetFunctionConfiguration",
        "lambda:AddPermission",
        "lambda:CreateFunction",
        "lambda:UpdateFunctionCode",
        "lambda:InvokeFunction",
        "lambda:UpdateFunctionConfiguration",
        "lambda:DeleteFunction",
        "apigateway:*",
        "iam:GetRole",
        "iam:CreateRole",
        "iam:PutRolePolicy",
        "iam:PassRole",
        "ec2:DescribeSubnets",
        "ec2:DescribeSecurityGroups",
        "ec2:DescribeVpcs",
        "s3:PutObject",
        "s3:GetObject"
        ]
    }
  ]
}

License

Copyright © 2017 Christophe Grand and Kimmo Koskinen

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].