Live-coding the Cloud!
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)
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).
lein install
(portkey is still alpha so not on clojars yet).[portkey "0.1.0-SNAPSHOT"]
to your project file.First steps:
Next steps:
fdef
specs could be leveraged to validate Lambda input.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"
]
}
]
}
Copyright © 2017 Christophe Grand and Kimmo Koskinen
Distributed under the Eclipse Public License either version 1.0 or (atyour option) any later version.
by Harini Janakiraman 通过哈里尼·贾纳基拉曼 第23天:如何使用带有哈利·波特PortKey的ARKit和Unity构建应用程序 (Day 23: How to build an app with ARKit and Unity featuring Harry Potter PortKey) Augmented Reality. The future screams of i
http://acm.timus.ru/problem.aspx?space=1&num=1447 最优比率生成树(最小生成树+二分) 黑书 p303 代码: #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<map> #include<vector> #include<stack> #i
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <iostream> #include <string> #include <vector> #include <cstdlib> #include <map> #include <ctime> #include <cmath>
代码连接了端口但依然提示 design has unconnected port 一个奇怪的警告,字面意思很清晰,有个端口未连接。 顶层 module Top ( input wire wSysClk50M , input wire wRstKey_n , ... input wire wSDO //出问题 wire ); ... Ctrl
could not establish connection to “”:Remote host key has changed, port forwarding is disabled 情况是原来用VSCode远程过服务器,后来服务器重装了,再用原来的ssh重新添加再连接出现上述错误,我解决的方法是在C:\Users\用户名\.ssh上找到known_hosts文件,是隐藏文件,将里面原来关于该
默认情况下,k8s 集群 nodePort 分配的端口范围为:30000-32767,如果我们指定的端口不在这个范围就会报类似下面这样的错误: Error: release kong failed: Service “kong-kong-admin” is invalid: spec.ports[0].nodePort: Invalid value: 8444: provided port is
git拉取代码报错: Unable to negotiate with 172.18.19.44 port 22: no matching host key type found. Their offer: ssh-rsa fatal: Could not read from remote repository. Please make sure you have the correct acc
1.问题 在Linux上 clone Gerrit 代码时报错:Unable to negotiate with 100.9.70.30 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 2.解决 vim ~/.ssh/config Host *.*.*.* KexA
问题描述 使用 remote-ssh 链接远程机器,发现控制台会报如下错误: $ ssh ec2-user@ec2-192-168-1-1.compute-1.amazonaws.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS C
问题 Unable to negotiate with 192.168.XX.XX port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 fatal: Could not read from remote repository. 解决方法 vi ~/.ssh/config
原因是Terminal找不到支持的密钥交换方法,因为新版Openssh中认为SHA1这种hash散列算法过于薄弱,已经不再支持,所以我们需要手动去允许对于SHA1的支持 。 解决办法: 在生成公钥的~/.ssh文件夹下,新建一个config文件(config文件没有后缀),文件中添加如下内容: Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedKeyT
标题 mac系统,想通过ssh连接,但出现以下报错:Unable to negotiate with 10.188.5.86 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss 解决办法:参考如下方式进行连接 ssh -oHostKeyAlgorithms=+ssh-dss Administrator@10.
解决: 前提: 在排除没有配置公钥的情况下。 在Git的安装目录下 Git > etc > ssh 文件夹下找到 ssh_config 文件,在文件末尾添加一下代码 Host * HostkeyAlgorithms +ssh-rsa PubkeyAcceptedAlgorithms +ssh-rsa