text: exports.handler = (event, context, callback) => {
    // もしQueryStringから値を取り出したい場合はevent.queryStringParametersから取得する
  
    // 動的にHTMLの内容を作成
    const html = `
    <html>
      <meta http-equiv="Content-Type" content="text/html" charset="utf-8">
      <head>
      <H1>まもるくん検出</H1>
      <script type="text/javascript">
        function selectdevice(){
        var selecturl = "http://dummy/1stStage/select"
        var selected = document.getElementById("displaydevice");
        var dev = device_select.displayselect.value;
        selected.innerHTML = "<p>"+dev+"</p>";
        }
  
        function updatedevice(){
        var updateurl = "http://dummy/1stStage/update";
        var selected = document.getElementById("updatedevice");
        var dev = device_update.updateselect.value;
        var mailaddr = device_update.mailaddr.value;
        var webhookurl = device_update.webhookurl.value;
        selected.innerHTML = "<p>device:"+dev+"<BR>mailaddr:"+mailaddr+"<BR>webhook:"+webhookurl+"</p>";
        }
  
        function deletedevice(){
        var deleteurl = "http://dummy/1stStage/delete"
        var selected = document.getElementById("deletedevice");
        var dev = device_delete.deleteselect.value;
        selected.innerHTML = "<p>"+dev+"</p>";
        }
  
      </script>
      </head>
      <body>
        <H2>デバイス状態確認</H2>
        <form name="device_select" action="selectdevice()">
  	デバイス名<BR>
  	<input type="text" name="displayselect" size="30" maxlength="30"><BR>
  	<input type="button" value="submit" onclick="selectdevice()">
        </form>
        <div id="displaydevice"></div>
        <HR>
        <H2>デバイス登録(通知先登録)</H2>
        <form name="device_update" action="updatedevice()">
  	デバイス名<BR>
  	<input type="text" name="updateselect" size="30" maxlength="30">
  	<BR>
  	メールアドレス<BR>
  	<input type="text" name="mailaddr" size="30" maxlength="30">
  	<BR>
  	webhook<BR>
  	<input type="text" name="webhookurl" size="100" maxlength="2048"><BR>
  	<input type="button" value="submit" onclick="updatedevice()">
        </form>
        <div id="updatedevice"></div>
        <HR>
        <H2>デバイス削除(通知停止)</H2>
        <form name="device_delete" action="deletedevice()">
  	デバイス名<BR>
  	<input type="text" name="deleteselect" size="30" maxlength="30"><BR>
  	<input type="button" value="submit" onclick="deletedevice()">
        </form>
        <div id="deletedevice"></div>
        <HR>
      </form>
      </body>
    </html>`;
  
    // Lambdaプロキシ統合の場合は下記のようなObjectでレスポンスを返せる
    const response = {
      statusCode: 200,
      headers: {
        'Content-Type': 'text/html',
      },
      body: html,
    };
  
    callback(null, response);
  };
  