{"id":19208626,"url":"https://github.com/heiwa4126/sam-hello-who","last_synced_at":"2026-06-24T00:02:21.679Z","repository":{"id":111910862,"uuid":"477627791","full_name":"heiwa4126/sam-hello-who","owner":"heiwa4126","description":"AWS SAMの Lambda + API Gatwayで 引数をGETメソッドとPOSTメソッドで渡すサンプル。Python 3.9","archived":false,"fork":false,"pushed_at":"2022-04-05T09:14:21.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T16:18:54.848Z","etag":null,"topics":["apigateway","aws-sam","example","lambda"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heiwa4126.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T09:15:33.000Z","updated_at":"2022-04-04T09:16:47.000Z","dependencies_parsed_at":"2023-04-07T22:33:19.517Z","dependency_job_id":null,"html_url":"https://github.com/heiwa4126/sam-hello-who","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-hello-who","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-hello-who/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-hello-who/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heiwa4126%2Fsam-hello-who/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heiwa4126","download_url":"https://codeload.github.com/heiwa4126/sam-hello-who/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240280984,"owners_count":19776418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apigateway","aws-sam","example","lambda"],"created_at":"2024-11-09T13:27:13.124Z","updated_at":"2025-11-14T00:02:51.654Z","avatar_url":"https://github.com/heiwa4126.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sam-hello-who\n\nAWS SAMの Lambda + API Gatwayで\n引数をGETメソッドとPOSTメソッドで渡すサンプル。\n\nPython 3.9\n\n中身は\"Hello {who}\\n\"を出すだけです。\n(whoが引数)\n\n\n# デプロイ\n\n```sh\nsam build\nsam deploy --guided  # --guidedは最初の1回\n```\n\n`sam deploy --guided` は\n\n```\nHelloWorldFunction may not have authorization defined, Is this okay? [y/N]: y\n```\n\n以外はデフォルトでいいです。\n\nデプロイが終わったら\n```sh\n./export1.sh  # 実行にはjqとyqとaws cliが必要\n```\n\nで、APIのURLを `.export.sh` に書き出してください。\n\n\n# テストの実行\n\n```sh\n./get_test.sh  # GETメソッドでテスト\n./post_test.sh # POSTメソッドでテスト\n```\n\n\n# スタックの削除\n\n```sh\nsam delete --no-prompts\n```\nで消えます。\n\n\n# メモ\n\n`post_test.sh`にかかれていますが、\nAPIゲートウエイにbody送るのには\n`application/json`にする必要があります。\nで、bodyはJSONで。\n\nJSONでない場合event.bodyが空になります(NilやらNONEやら)。\n\nAPI Gatewayのコンソールからテストするときも、\nPOSTの方は「リクエスト本文」のところにJSONを書くこと。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiwa4126%2Fsam-hello-who","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheiwa4126%2Fsam-hello-who","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheiwa4126%2Fsam-hello-who/lists"}