{"id":18871463,"url":"https://github.com/sfomuseum/flamework-aws","last_synced_at":"2025-07-25T18:33:57.954Z","repository":{"id":230258851,"uuid":"778574636","full_name":"sfomuseum/flamework-aws","owner":"sfomuseum","description":"Limited (and opionated) methods for working with AWS services in a Flamework-based application.","archived":false,"fork":false,"pushed_at":"2024-03-28T18:14:51.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T18:56:53.829Z","etag":null,"topics":["flamework"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfomuseum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-03-28T01:18:21.000Z","updated_at":"2024-03-28T18:16:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a74fc861-7266-4640-a160-86a9efe6de16","html_url":"https://github.com/sfomuseum/flamework-aws","commit_stats":null,"previous_names":["sfomuseum/flamework-aws"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sfomuseum/flamework-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfomuseum%2Fflamework-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfomuseum%2Fflamework-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfomuseum%2Fflamework-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfomuseum%2Fflamework-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfomuseum","download_url":"https://codeload.github.com/sfomuseum/flamework-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfomuseum%2Fflamework-aws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267046172,"owners_count":24026897,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["flamework"],"created_at":"2024-11-08T05:25:59.971Z","updated_at":"2025-07-25T18:33:57.907Z","avatar_url":"https://github.com/sfomuseum.png","language":"PHP","readme":"# flamework-aws\n\nLimited (and opionated) methods for working with AWS services in a Flamework-based application.\n\n## Documentation\n\n### lib_aws_signer_v4.php\n\n#### aws_signer_v4_headers($http_method, $uri, $region, $service, $creds, $data, $debug=FALSE)\n\nReturn an array containing the necessary header for executing an AWS \"v4\" signed request. For example:\n\n```\n$http_method = \"POST\";\n$uri = \"https://{SOME_FUNCTION_URL}.lambda-url.{REGION}.on.aws/api/point-in-polygon\";\n$region = \"{REGION}\";\n$service = \"lambda\";\n\n// How and where these AWS credentials are derived is left to be determined on a per-application basis.\n$creds = array(\n\t\"access_key\" =\u003e \"...\",\n\t\"secret_key\" =\u003e \"...\",\n\t\"security_token\" =\u003e \"...\",\n);\n\n$data = json_encode(array(\"latitude\" =\u003e 25.0, \"longitude\" =\u003e -45.6 ));\n\n$headers = aws_signer_v4_headers($http_method, $uri, $region, $service, $creds, $data);\ndumper($headers);\n```\n\n#### aws_signer_v4_execute_request($http_method, $uri, $region, $service, $creds, $data)\n\nExecute an AWS \"v4\" signed request and return the result. For example:\n\n```\n$http_method = \"POST\";\n$uri = \"https://{SOME_FUNCTION_URL}.lambda-url.{REGION}.on.aws/api/point-in-polygon\";\n$region = \"{REGION}\";\n$service = \"lambda\";\n\n// How and where these AWS credentials are derived is left to be determined on a per-application basis.\n$creds = array(\n\t\"access_key\" =\u003e \"...\",\n\t\"secret_key\" =\u003e \"...\",\n\t\"security_token\" =\u003e \"...\",\n);\n\n$data = json_encode(array(\"latitude\" =\u003e 25.0, \"longitude\" =\u003e -45.6 ));\n\n$rsp = aws_signer_v4_execute_request($http_method, $uri, $region, $service, $creds, $data);\ndumper($rsp);\n```\n\nWhich, in this example, would return something like:\n\n```\narray (\n  'ok' =\u003e 1,\n  'body' =\u003e '{\"places\":[{\"wof:id\":\"404528709\",\"wof:parent_id\":\"-1\",\"wof:name\":\"North Atlantic Ocean\",\"wof:country\":\"\",\"wof:placetype\":\"ocean\",\"mz:latitude\":0,\"mz:longitude\":0,\"mz:min_latitude\":24.965357,\"mz:min_longitude\":0,\"mz:max_latitude\":-45.616087,\"mz:max_longitude\":-45.570425,\"mz:is_current\":1,\"mz:is_deprecated\":-1,\"mz:is_ceased\":-1,\"mz:is_superseded\":0,\"mz:is_superseding\":0,\"edtf:inception\":\"\",\"edtf:cessation\":\"\",\"wof:supersedes\":[],\"wof:superseded_by\":[],\"wof:belongsto\":[],\"wof:path\":\"404/528/709/404528709.geojson\",\"wof:repo\":\"whosonfirst-data-admin-xy\",\"wof:lastmodified\":1690923898}]}\n',\n)\n```\n\n## See also\n\n* https://github.com/sfomuseum/flamework","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfomuseum%2Fflamework-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfomuseum%2Fflamework-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfomuseum%2Fflamework-aws/lists"}