{"id":22025286,"url":"https://github.com/beeceej/inflight","last_synced_at":"2025-03-23T10:46:21.718Z","repository":{"id":57579485,"uuid":"164355510","full_name":"beeceej/inflight","owner":"beeceej","description":"Abstracts away Retrieving and Writing Data to S3","archived":false,"fork":false,"pushed_at":"2020-09-30T21:26:50.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T17:22:31.851Z","etag":null,"topics":["aws","aws-lambda","go","golang","stepfunctions"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeceej.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}},"created_at":"2019-01-06T23:46:44.000Z","updated_at":"2020-09-30T21:26:52.000Z","dependencies_parsed_at":"2022-09-26T19:12:16.749Z","dependency_job_id":null,"html_url":"https://github.com/beeceej/inflight","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeceej%2Finflight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeceej%2Finflight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeceej%2Finflight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeceej%2Finflight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeceej","download_url":"https://codeload.github.com/beeceej/inflight/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090858,"owners_count":20559296,"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":["aws","aws-lambda","go","golang","stepfunctions"],"created_at":"2024-11-30T07:15:32.332Z","updated_at":"2025-03-23T10:46:21.694Z","avatar_url":"https://github.com/beeceej.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inflight\n[![Build Status](https://travis-ci.org/beeceej/inflight.svg?branch=master)](https://travis-ci.org/beeceej/inflight)\n[![codecov](https://codecov.io/gh/beeceej/inflight/branch/master/graph/badge.svg)](https://codecov.io/gh/beeceej/inflight)\n[![Go Report Card](https://goreportcard.com/badge/github.com/beeceej/inflight)](https://goreportcard.com/report/github.com/beeceej/inflight)\n\nInflight is a simple package which abstracts away writing to and from S3. It handles retries (with an exponential back off algorithm), and can be configured to write to any S3 bucket.\n\nAn Example of where this package could be useful is when the data you're working with is too large to be manually passed through. This provides a simple way to ship references to data between functions in a state machine.\n\nExample usage.\n\n## Lambda 1:\n```go\npackage main\n\nvar infl *inflight.Infight\n\nfunc init() {\n  bucket := os.Getenv(\"INFLIGHT_BUCKET\")\n  path := os.Getenv(\"INFLIGHT_PATH\")\n  s3 := //an s3 client\n  infl = inflight.NewInflight(Bucket(bucket), KeyPath(path), s3)\n}\n\nfunc handler(event interface{}) *inflight.Ref {\n  dataWhichIsOverTheAwsLimit := bytes.NewReader(...)\n  return infl.Write(dataWhichIsOverTheAwsLimit)\n}\n\nfunc main() {\n  lambda.Start(handler)\n}\n```\n\n## Lambda 2:\n```go\npackage main\n\nvar infl *inflight.Infight\n\nfunc init() {\n  bucket := os.Getenv(\"INFLIGHT_BUCKET\")\n  path := os.Getenv(\"INFLIGHT_PATH\")\n  s3 := //an s3 client\n  infl = inflight.NewInflight(Bucket(bucket), KeyPath(path), s3)\n}\n\nfunc handler(event *inflight.Ref) *inflight.Ref {\n  b, err := infl.Get(event.Object)\n  // ...\n  // Do Some stuff with your data\n  // ...\n\n  dataWhichIsOverTheAwsLimit := doSomeStuffWithYourData(b)\n\n  // Write the data back\n  return infl.Write(dataWhichIsOverTheAwsLimit)\n}\n\nfunc main() {\n  lambda.Start(handler)\n}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeceej%2Finflight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeceej%2Finflight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeceej%2Finflight/lists"}