================================================================ 4. HTML問い合わせフォームの作成 ================================================================ .. include:: ./_defines-s3.txt .. include:: ./_defines-s3-website.txt .. .. |AWS_DEFAULT_PROFILE| replace:: .. .. |AWS_DEFAULT_REGION| replace:: ap-northeast-1 .. |DIR_CONTENTS| replace:: ${HOME}/tmp/conf-html-handson20170904 .. |COGNITO_IDPOOL_NAME| replace:: handson20170904pool .. |COGNITO_IDPOOL_ID| replace:: |AWS_DEFAULT_REGION|\ :xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx .. |S3_BUCKET_PREFIX_DATA| replace:: handson20170904data .. |S3_BUCKET_DATA| replace:: |S3_BUCKET_PREFIX_DATA|\ -\ |AWS_ID| ---------------------------------------------------------------- 作業の目的 [why] ---------------------------------------------------------------- お問い合わせフォームを作成します。 .. .. include:: ../../../resource-catalog/task-html/html-form_contact-aws-cognito-create/_display-condition-common-html-form_contact-aws-cognito-create.txt .. include:: ../../../resource-catalog/task-html/html-form_contact-aws-cognito-create/html-form_contact-aws-cognito-create.txt 3.3. 後処理に必要な作業 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% .. rubric:: S3バケットの確認 コマンド: .. code-block:: sh aws s3 ls ${S3_BUCKET_DATA}/uploads/ 結果(例): .. parsed-literal:: |today| 01:23:45 142 1504447230062.txt .. rubric:: 問い合わせの取得 コマンド: .. code-block:: sh mkdir -p ${HOME}/tmp/${S3_BUCKET_NAME} \ && cd ${HOME}/tmp/${S3_BUCKET_NAME} コマンド: .. code-block:: sh aws s3 cp --recursive s3://${S3_BUCKET_DATA}/uploads . \ 結果(例): .. parsed-literal:: download: s3://\ |S3_BUCKET_NAME|\ /uploads/1504447230062.txt to ./1504447230062.txt コマンド: .. code-block:: sh cat *.txt 結果(例): .. code-block:: sh { "title": "こんにちは", "mail": "info@example.jp", "contents": "ご無沙汰しております。", "date": "2017/9/4 20:00:30" } .. rubric:: 問い合わせの消去 コマンド: .. code-block:: sh cd \ && rm -r ${HOME}/tmp/${S3_BUCKET_NAME} ---------------------------------------------------------------- 完了 ----------------------------------------------------------------