{"id":18542765,"url":"https://github.com/coinbase/step-hello-world","last_synced_at":"2025-04-09T18:32:11.717Z","repository":{"id":48768840,"uuid":"123670105","full_name":"coinbase/step-hello-world","owner":"coinbase","description":"example coinbase/step framework application","archived":false,"fork":false,"pushed_at":"2022-10-06T00:17:26.000Z","size":35,"stargazers_count":5,"open_issues_count":2,"forks_count":5,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-03-24T10:38:42.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coinbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-03T07:33:31.000Z","updated_at":"2024-12-03T14:46:30.000Z","dependencies_parsed_at":"2023-01-19T07:45:15.601Z","dependency_job_id":null,"html_url":"https://github.com/coinbase/step-hello-world","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/coinbase%2Fstep-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fstep-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fstep-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fstep-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase","download_url":"https://codeload.github.com/coinbase/step-hello-world/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248087859,"owners_count":21045602,"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":[],"created_at":"2024-11-06T20:10:28.466Z","updated_at":"2025-04-09T18:32:06.708Z","avatar_url":"https://github.com/coinbase.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# step-hello-world\n\n`step-hello-world` is an example application for the [Step](https://github.com/coinbase/step) library. It is a AWS Step Function and Lambda that takes an input, and returns a greeting.\n\n\n### Getting started\n\nBuilding with `go build .`, which will create the binary `step-hello-world`.\n\nYou can test its execution with:\n\n```bash\n./step-hello-world exec\n{\n  \"Greeting\": \"Hello World\"\n}\n\n./step-hello-world exec '{\"Greeting\": \"Hi\"}'\n{\n \"Greeting\": \"Hi\"\n}\n```\n\nLooking at the State Machine output:\n\n```bash\n./step-hello-world json\n{\n \"Comment\": \"Hello World\",\n \"StartAt\": \"Hello\",\n \"States\": {\n  \"Hello\": {\n   \"Type\": \"TaskFn\",\n   \"Comment\": \"Deploy Step Function\",\n   \"Resource\": \"coinbase-step-hello-world\",\n   \"End\": true\n  }\n }\n}\n```\n\n### Deploying\n\nTo create the AWS resources we use [GeoEngineer](https://github.com/coinbase/geoengineer). This requires `ruby`, `bundler` and `terraform`. \n\nCreate the resources with:\n\n```\nbundle\n./geo apply resources/step-hello-world.rb\n```\n\nOnce the resources are created you can bootstrap or deploy `step-hello-world` with the `step` binary from [github.com/coinbase/step](https://github.com/coinbase/step). \n\nBootstrap (directly upload to the Step Function and Lambda):\n\n```bash\n# Use AWS credentials or assume-role into AWS\n# Build linux zip for lambda\nGOOS=linux go build -o lambda\nzip lambda.zip lambda\n\n# Tell step to bootstrap this lambda\nstep bootstrap                        \\\n  -lambda \"coinbase-step-hello-world\" \\\n  -step \"coinbase-step-hello-world\"   \\\n  -states \"$(./step-hello-world json)\"\n```\n\nDeploy (via the step-deployer step function in github.com/coinbase/step):\n\n```bash\nGOOS=linux go build -o lambda\nzip lambda.zip lambda\n\n# Tell step-deployer to deploy this lambda\nstep deploy                           \\\n  -lambda \"coinbase-step-hello-world\" \\\n  -step \"coinbase-step-hello-world\"   \\\n  -project \"coinbase/step-hello-world\"\\\n  -config \"development\"               \\\n  -states \"$(./step-hello-world json)\"\n```\n\nTo invoke the deployed step-hello-world in AWS requires the `aws-cli`:\n\n```bash\n\nARN=\"arn:aws:states:${AWS_REGION}:${AWS_ACCOUNT_ID}:stateMachine:coinbase-step-hello-world\"\n\nEXECUTION_ARN=$(aws stepfunctions start-execution \\\n                     --state-machine-arn $ARN \\\n                     --input '{\"Greeting\": \"Hi\"}' | jq -r \".executionArn\" )\n\nsleep 1\n\naws stepfunctions describe-execution --execution-arn $EXECUTION_ARN\n{\n    \"executionArn\": \"...coinbase-step-hello-world:execution\",\n    \"stateMachineArn\": \"...stateMachine:coinbase-step-hello-world\",\n    \"name\": \"...\",\n    \"status\": \"SUCCEEDED\",\n    \"startDate\": 1520050165.321,\n    \"stopDate\": 1520050165.597,\n    \"input\": \"{\\\"Greeting\\\": \\\"Hi\\\"}\",\n    \"output\": \"{\\\"Greeting\\\":\\\"Hi\\\"}\"\n}\n\naws stepfunctions get-execution-history --execution-arn $EXECUTION_ARN\n\n{\n    \"events\": [\n        {\n            \"timestamp\": 1520050165.321,\n            \"type\": \"ExecutionStarted\",\n            \"id\": 1,\n            \"previousEventId\": 0,\n            \"executionStartedEventDetails\": {\n                \"input\": \"{\\\"Greeting\\\": \\\"Hi\\\"}\",\n                \"roleArn\": \"...role/coinbase-step-hello-world-step-function-role\"\n            }\n        },\n        ...\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fstep-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase%2Fstep-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fstep-hello-world/lists"}