17. 今回のre:Inventで・・・触ってみた - curlコマンドを叩いてみる
P-1174:~ ma-kobayashi$ curl -v http://kbys-lambda-alb-xxxxxxxxxx.ap-northeast-1.elb.amazonaws.com
* Rebuilt URL to: http://kbys-lambda-alb-xxxxxxxxxx.ap-northeast-1.elb.amazonaws.com/
* Trying xx.xxx.xxx.xxx….
* TCP_NODELAY set
* Connected to kbys-lambda-alb-xxxxxxxxxx.ap-northeast-1.elb.amazonaws.com (xx.xxx.xxx.xxx) port 80 (#0)
> GET / HTTP/1.1
> Host: kbys-lambda-alb-xxxxxxxxxx.ap-northeast-1.elb.amazonaws.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 502 Bad Gateway
< Server: awselb/2.0
< Date: Mon, 10 Dec 2018 07:23:54 GMT
< Content-Type: text/html
< Content-Length: 138
< Connection: keep-alive
<
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
</body>
</html>
* Connection #0 to host kbys-lambda-alb-xxxxxxxxxx.ap-northeast-1.elb.amazonaws.com left intact
18. 触ってみた - curlコマンドを叩いてみる
The response from the Lambda function
is not in the expected format
(レスポンスの型が違います)
19. 触ってみた
Requests can include HTTP GET, HEAD, PUT, POST, DELETE, PATCH and
OPTIONS methods, and request and response bodies can be text or binary.
The Application Load Balancer that you’ve set up with AWS Lambda takes
care of translating an HTTP/S request into an AWS Lambda-compatible event.
要求には、HTTP GET、HEAD、PUT、POST、DELETE、PATCH、OPTIONSメソッドが
含まれ、要求および応答の本文にはテキストまたはバイナリを使用できます。 AWS
Lambdaで設定したApplication Load Balancerは、HTTP(S)リクエストをAWS Lambda
イベントに変換します。
Lambda functions as targets for Application Load Balancers
https://aws.amazon.com/jp/blogs/news/lambda-functions-as-targets-for-application-load-balancers/