{"action":"created","issue":{"url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/2","repository_url":"https://api.github.com/repos/selmertsx/lambda_sample","labels_url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/2/comments","events_url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/2/events","html_url":"https://github.com/selmertsx/lambda_sample/issues/2","id":345118118,"node_id":"MDU6SXNzdWUzNDUxMTgxMTg=","number":2,"title":"typescript化対応するときの手順を残しておく","user":{"login":"selmertsx","id":1563239,"node_id":"MDQ6VXNlcjE1NjMyMzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1563239?v=4","gravatar_id":"","url":"https://api.github.com/users/selmertsx","html_url":"https://github.com/selmertsx","followers_url":"https://api.github.com/users/selmertsx/followers","following_url":"https://api.github.com/users/selmertsx/following{/other_user}","gists_url":"https://api.github.com/users/selmertsx/gists{/gist_id}","starred_url":"https://api.github.com/users/selmertsx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selmertsx/subscriptions","organizations_url":"https://api.github.com/users/selmertsx/orgs","repos_url":"https://api.github.com/users/selmertsx/repos","events_url":"https://api.github.com/users/selmertsx/events{/privacy}","received_events_url":"https://api.github.com/users/selmertsx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-07-27T07:21:10Z","updated_at":"2018-07-27T10:55:34Z","closed_at":null,"author_association":"OWNER","body":"```\r\n$ cp -R sam-app typescript_lambda\r\n$ cd typescript_lambda\r\n$ cp hello_world/package.json ./\r\n$ mkdir src\r\n$ mkdir dist\r\n$ rm -rf hello_world\r\n```"},"comment":{"url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/comments/408385024","html_url":"https://github.com/selmertsx/lambda_sample/issues/2#issuecomment-408385024","issue_url":"https://api.github.com/repos/selmertsx/lambda_sample/issues/2","id":408385024,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODM4NTAyNA==","user":{"login":"selmertsx","id":1563239,"node_id":"MDQ6VXNlcjE1NjMyMzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1563239?v=4","gravatar_id":"","url":"https://api.github.com/users/selmertsx","html_url":"https://github.com/selmertsx","followers_url":"https://api.github.com/users/selmertsx/followers","following_url":"https://api.github.com/users/selmertsx/following{/other_user}","gists_url":"https://api.github.com/users/selmertsx/gists{/gist_id}","starred_url":"https://api.github.com/users/selmertsx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selmertsx/subscriptions","organizations_url":"https://api.github.com/users/selmertsx/orgs","repos_url":"https://api.github.com/users/selmertsx/repos","events_url":"https://api.github.com/users/selmertsx/events{/privacy}","received_events_url":"https://api.github.com/users/selmertsx/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T10:55:34Z","updated_at":"2018-07-27T10:55:34Z","author_association":"OWNER","body":"```index.ts\r\nimport {\r\n  APIGatewayEventRequestContext,\r\n  APIGatewayProxyCallback,\r\n  APIGatewayProxyEvent,\r\n  APIGatewayProxyResult\r\n} from \"aws-lambda\";\r\n\r\nimport axios from \"axios\";\r\nconst url: string = \"http://checkip.amazonaws.com/\";\r\nlet response: APIGatewayProxyResult;\r\n\r\nexports.lambda_handler = async (\r\n  event: APIGatewayProxyEvent,\r\n  context: APIGatewayEventRequestContext,\r\n  callback: APIGatewayProxyCallback\r\n): Promise<void> => {\r\n  try {\r\n    const ret = await axios(url);\r\n    response = {\r\n      statusCode: 200,\r\n      body: JSON.stringify({\r\n        message: \"hello world\",\r\n        location: ret.data.trim()\r\n      })\r\n    };\r\n  } catch (err) {\r\n    console.log(err);\r\n    callback(err, response);\r\n  }\r\n  callback(null, response);\r\n};\r\n```\r\n\r\n直した。これをcompileして lambda実行できるか見てく。"}}
{"actor":{"display_login":"selmertsx"}}