{"id":17356528,"url":"https://github.com/karl-cardenas-coding/go-lambda-cleanup","last_synced_at":"2026-03-07T06:15:55.810Z","repository":{"id":37723057,"uuid":"342382997","full_name":"karl-cardenas-coding/go-lambda-cleanup","owner":"karl-cardenas-coding","description":"🚧 go-lambda-cleanup - A solution for removing previous versions of AWS Lambdas","archived":false,"fork":false,"pushed_at":"2026-02-16T03:01:07.000Z","size":29029,"stargazers_count":96,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-16T08:55:54.909Z","etag":null,"topics":["automation","aws","go"],"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/karl-cardenas-coding.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["karl-cardenas-coding"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-02-25T21:24:39.000Z","updated_at":"2026-02-16T03:01:10.000Z","dependencies_parsed_at":"2023-02-15T03:47:06.469Z","dependency_job_id":"7063ebdd-af93-4cd4-926e-2e2d7d6991df","html_url":"https://github.com/karl-cardenas-coding/go-lambda-cleanup","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/karl-cardenas-coding/go-lambda-cleanup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fgo-lambda-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fgo-lambda-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fgo-lambda-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fgo-lambda-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karl-cardenas-coding","download_url":"https://codeload.github.com/karl-cardenas-coding/go-lambda-cleanup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karl-cardenas-coding%2Fgo-lambda-cleanup/sbom","scorecard":{"id":550381,"data":{"date":"2025-08-11","repo":{"name":"github.com/karl-cardenas-coding/go-lambda-cleanup","commit":"6d8bf43d56e3d0ee21a9344b670f258a2852798a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:25","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:26","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/image-prune.yaml:1","Warn: no topLevel permission defined: .github/workflows/nightly.yaml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/pull_request.yml:9","Warn: topLevel 'packages' permission set to 'write': .github/workflows/pull_request.yml:10","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/codeql-analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/image-prune.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/image-prune.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yaml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/nightly.yaml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/nightly.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request.yml:100: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/pull_request.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:102: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:117: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:131: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/karl-cardenas-coding/go-lambda-cleanup/test.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:4","Warn: containerImage not pinned by hash: Dockerfile:16: pin your Docker image by updating alpine:latest to alpine:latest@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Info:   0 out of  17 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  15 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.0.17 not signed: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/203254542","Warn: release artifact v2.0.16 not signed: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/192576735","Warn: release artifact v2.0.15 not signed: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/178572517","Warn: release artifact v2.0.14 not signed: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/170726621","Warn: release artifact v2.0.13 not signed: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/154270696","Warn: release artifact v2.0.17 does not have provenance: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/203254542","Warn: release artifact v2.0.16 does not have provenance: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/192576735","Warn: release artifact v2.0.15 does not have provenance: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/178572517","Warn: release artifact v2.0.14 does not have provenance: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/170726621","Warn: release artifact v2.0.13 does not have provenance: https://api.github.com/repos/karl-cardenas-coding/go-lambda-cleanup/releases/154270696"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/nightly.yaml:14"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Warn: could not determine whether codeowners review is allowed","Warn: no status checks found to merge onto branch 'main'","Warn: PRs are not required to make changes on branch 'main'; or we don't have data to detect it.If you think it might be the latter, make sure to run Scorecard with a PAT or use Repo Rules (that are always public) instead of Branch Protection settings"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 28 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T10:40:46.883Z","repository_id":37723057,"created_at":"2025-08-20T10:40:46.883Z","updated_at":"2025-08-20T10:40:46.883Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["automation","aws","go"],"created_at":"2024-10-15T18:40:23.633Z","updated_at":"2026-03-07T06:15:55.798Z","avatar_url":"https://github.com/karl-cardenas-coding.png","language":"Go","funding_links":["https://github.com/sponsors/karl-cardenas-coding"],"categories":["Utilities","公用事业公司"],"sub_categories":["Utility/Miscellaneous","实用程序/Miscellaneous"],"readme":"# go-lambda-cleanup\n[![Go Reference](https://pkg.go.dev/badge/github.com/karl-cardenas-coding/go-lambda-cleanup.svg)](https://pkg.go.dev/github.com/karl-cardenas-coding/go-lambda-cleanup/v2)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)  \n[![Go version](https://img.shields.io/github/go-mod/go-version/karl-cardenas-coding/go-lambda-cleanup)](https://golang.org/dl/)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![codecov](https://codecov.io/gh/karl-cardenas-coding/go-lambda-cleanup/graph/badge.svg?token=S8SY4ZA2ZA)](https://codecov.io/gh/karl-cardenas-coding/go-lambda-cleanup)\n[![Go Report Card](https://goreportcard.com/badge/github.com/karl-cardenas-coding/go-lambda-cleanup/v2)](https://goreportcard.com/report/github.com/karl-cardenas-coding/go-lambda-cleanup/v2)\n[![Nightly Release](https://github.com/karl-cardenas-coding/go-lambda-cleanup/actions/workflows/nightly.yaml/badge.svg)](https://github.com/karl-cardenas-coding/go-lambda-cleanup/actions/workflows/nightly.yaml)\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/static/logo.png\" alt=\"drawing\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eA Go based CLI for removing unused versions of AWS Lambdas. One binary, no additional dependencies required. \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"/static/glc.gif\" alt=\"drawing\" width=\"800\"/\u003e\n\u003c/p\u003e\n\n\n## Installation\ngo-lambda-cleanup is distributed as a single binary. [Download](https://github.com/karl-cardenas-coding/go-lambda-cleanup/releases) the binary and install go-lambda-cleanup in a directory in your system's [PATH](https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them). `/usr/local/bin` is the recommended path for UNIX/LINUX environments. \n\n```shell\nVERSION=2.0.19\nwget https://github.com/karl-cardenas-coding/go-lambda-cleanup/releases/download/v$VERSION/go-lambda-cleanup-v$VERSION-linux-amd64.zip\nunzip go-lambda-cleanup-v$VERSION-linux-amd64.zip \nsudo mv glc /usr/local/bin/\n```\n\n\n## Docker\ngo-lambda-cleanup is also available as a Docker image. Check out the [GitHub Packages](https://github.com/karl-cardenas-coding/go-lambda-cleanup/pkgs/container/go-lambda-cleanup) page for this repository to learn more about the available images.\n\n```\nVERSION=v2.0.19\ndocker pull ghcr.io/karl-cardenas-coding/go-lambda-cleanup:$VERSION\n```\n\nYou can pass AWS credentials to the container through ENVIRONMENT variables.\n```\nexport AWS_ACCESS_KEY_ID=47as12fdsdg....\nexport AWS_SECRET_ACCESS_KEY=21a5sf5dg8e...\n\ndocker run -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ghcr.io/karl-cardenas-coding/go-lambda-cleanup:$VERSION clean -r us-east-1 -d\ntime=05/23/22 level=info msg=\"******** DRY RUN MODE ENABLED ********\"\ntime=05/23/22 level=info msg=\"Scanning AWS environment in us-east-1\"\ntime=05/23/22 level=info msg=............\ntime=05/23/22 level=info msg=\"8 Lambdas identified\"\ntime=05/23/22 level=info msg=\"Current storage size: 193 MB\"\ntime=05/23/22 level=info msg=\"**************************\"\ntime=05/23/22 level=info msg=\"Initiating clean-up process. This may take a few minutes....\"\ntime=05/23/22 level=info msg=............\ntime=05/23/22 level=info msg=............\ntime=05/23/22 level=info msg=\"24 unique versions will be removed in an actual execution.\"\ntime=05/23/22 level=info msg=\"124 MB of storage space will be removed in an actual execution.\"\ntime=05/23/22 level=info msg=\"Job Duration Time: 1.454406s\"\n```\n\n### Nightly Release\n\nA nightly release is available as a Docker image. The nightly release is a snapshot of the main branch and automatically updated with the latest minor depedencies updates.  \n\n```shell\ndocker pull ghcr.io/karl-cardenas-coding/go-lambda-cleanup:nightly\n```\n\n\n\n## Usage\n\n```shell\nUsage:\n  glc [flags]\n  glc [command]\n\nAvailable Commands:\n  clean       Removes all former versions of AWS lambdas except for the $LATEST version\n  help        Help about any command\n  version     Print the current version number of glc\n\nFlags:\n  -d, --dryrun                    Executes a dry run (bool)\n  -h, --help                      help for glc\n  -l, --listFile string           Specify a file containing Lambdas to delete.\n  -m, --moreLambdaDetails         Set to true to show Lambda names and count of versions to be removed (bool)\n  -p, --profile string            Specify the AWS profile to leverage for authentication.\n  -r, --region string             Specify the desired AWS region to target.\n  -i, --size-iec                  Displays file sizes in IEC units (bool)\n  -v, --verbose                   Set to true to enable debugging (bool)\n\nUse \"glc [command] --help\" for more information about a command.\n```\n\n### Versions Retention \n\nTo retain previous version excluding `$LATEST`, use the `-c` flag. Use this flag to control the number of versions to retain.\n```shell\n$ glc clean -r us-east-2 -c 2 -p myProfile\n```\n\n### Additonal Lambda Details\nTo view additional details, such as the Lambda names and version counts, set the `-m` flag to true.\n\n```shell\nglc clean -r us-east-1 -dmp mySuperAwesomeProfile\n```\n\n```shell\nINFO[07/31/22] Scanning AWS environment in us-east-1\nINFO[07/31/22] ............\nINFO[07/31/22] 72 Lambdas identified\nINFO[07/31/22] Current storage size: 817 MiB\nINFO[07/31/22] **************************\nINFO[07/31/22] Initiating clean-up process. This may take a few minutes....\nINFO[07/31/22] ............\nINFO[07/31/22]     1 versions of YourLambda to be removed\nINFO[07/31/22]     1 versions of AnotherLambda to be removed\nINFO[07/31/22] ............\nINFO[07/31/22] 2 unique versions will be removed in an actual execution.\nINFO[07/31/22] 12 MiB of storage space will be removed in an actual execution.\nINFO[07/31/22] Job Duration Time: 9.409405s\n```\n\n\n### Lambda Aliases\n\nAWS disallows the deletion of Lambda versions that are attached to an alias. The default behavior of `glc` is to attempt to delete a Lambda version, regardless of whether it has an alias attachment. If a Lambda version is attached to an alias and `glc` attempts to delete the version, an error will occur, and the program will exit with a non-zero exit code.\n\nYou can use the CLI flags `--skip-aliases` or `-s` to check\nthe Lambda version for the existence of aliases and skip the removal step if an alias is attached to the version. This check entails one additional API query per lambda, so consider not enabling this functionality if you do not use aliases.\n\n## Compile\nIf you want to complile the binary, clone the project to your local system. Ensure you have `Go 1.18` installed. This tool leverages the Golang [embed](https://golang.org/pkg/embed/) functionality. A file named `aws-regions.txt` is expected in the `cmd/` directory.  You need valid AWS credentials in order to generate the file.\n```shell\ngit clone git@github.com:karl-cardenas-coding/go-lambda-cleanup.git\naws ec2 describe-regions --region us-east-1 --all-regions --query \"Regions[].RegionName\" --output text \u003e\u003e cmd/aws-regions.txt\ngo build -o glc\n```\n\n### File Size Format\nTo display file sizes in [IEC format](https://en.wikipedia.org/wiki/Binary_prefix), enable the `-i` flag.\n```shell\n$ glc clean -i -r us-east-1 -p myProfile\n```\n\n### Dry Run\n\nYou also have the ability to preview an execution by leveraging the dry run flag `-d`\n\n```shell\n $ glc clean -p myProfile -r us-east-1 -d\nINFO[03/19/21] The AWS Profile flag \"myProfile\" was passed in\nINFO[03/19/21] ******** DRY RUN MODE ENABLED ********\nINFO[03/19/21] Scanning AWS environment in us-east-1\nINFO[03/19/21] ............\nINFO[03/19/21] 50 Lambdas identified\nINFO[03/19/21] Current storage size: 1.2 GB\nINFO[03/19/21] **************************\nINFO[03/19/21] Initiating clean-up process. This may take a few minutes....\nINFO[03/19/21] ............\nINFO[03/19/21] ............\nINFO[03/19/21] 82 unique versions will be removed in an actual execution.\nINFO[03/19/21] 554 MB of storage space will be removed in an actual execution.\nINFO[03/19/21] Job Duration Time: 7.834585s\n```\n\n### Custom List\nYou can provide an input file containing a list of Lambda functions to be cleaned-up. The input file can be of the following types; `json`, `yaml`, or `yml.`  An input file allows you to control the execution more granularly. \n\n#### YAML\n```yaml\n# custom_list.yaml\nlambdas:\n  - stopEC2-instances\n  - putControls\n```\n\n```shell\n$ glc clean -r us-east-1 -p myProfile -l custom_list.yaml\n```\n\n#### JSON\n```json\n{\n    \"lambdas\": [\n        \"stopEC2-instances\",\n        \"putControls\"\n    ]\n}\n```\n\n```shell\nglc clean -r us-east-1 -p myProfile -l custom_list.json\n```\n\n\n### IAM Permissions\n\ngo-lambda-cleanup requires the following IAM permissions to operate. \n\n- `lambda:ListFunctions`\n- `lambda:ListVersionsByFunction`\n- `lambda:ListAliases`\n- `lambda:DeleteFunction`\n\nThe following code snippet is an IAM policy you may assign to the IAM User or IAM Role used by go-lambda-cleanup.\n\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"goLambdaCleanup\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"lambda:ListFunctions\",\n                \"lambda:ListVersionsByFunction\",\n                \"lambda:ListAliases\",\n                \"lambda:DeleteFunction\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}\n```\n\n### Authentication\ngo-lambda-clean utilizes the default AWS Go SDK credentials provider to find AWS credentials. The default provider chain looks for credentials in the following order:\n\n1. Environment variables.\n\n2. Shared credentials file.\n\n3. If your application uses an ECS task definition or RunTask API operation, IAM role for tasks.\n\n4. If your application is running on an Amazon EC2 instance, IAM role for Amazon EC2.\n\n_If there is an MFA serial attached to the credentials, you will be prompted for an MFA token._\n\n#### Shared File Example\nIf `~/.aws/config` and `~/.aws/config` is setup for the AWS CLI then you may leverage the existing profile configuration for authentication.\n```shell\n$ export AWS_PROFILE=sb-test\n$ glc clean -r us-west-2\nINFO[03/05/21] Scanning AWS environment in us-west-2\nINFO[03/05/21] ............\n```\nAlternatively, the `--profile` flag may be used.\n```shell\n$ glc clean -r us-west-2 -p myProfile\nINFO[03/05/21] Scanning AWS environment in us-west-2\nINFO[03/05/21] ............\n```\n\n#### Environment Variables\nStatic credentials may be also be used to authenticate into AWS.\n* AWS_ACCESS_KEY_ID\n\n* AWS_SECRET_ACCESS_KEY\n\n* AWS_SESSION_TOKEN (optional)\n```shell\n$ export AWS_ACCESS_KEY_ID=YOUR_AKID\n$ export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY\n$ export AWS_SESSION_TOKEN=TOKEN\n$ glc clean -r us-west-2\n2021/03/04 20:42:46 Scanning AWS environment in us-west-2.....\n2021/03/04 20:42:46 ............\n```\n\n## Proxy\nThe tool supports network proxy configurations and will honor the following proxy environment variables.\n\n* `HTTP_PROXY`\n* `HTTPS_PROXY`\n* `NO_PROXY`\n\nThe environment values may be either a complete URL or a \"host[:port]\", in which case the \"http\" scheme is assumed. An error is returned if the value is a different form.\n\n```shell\n$ export HTTP_PROXY=http://proxy.example.org:9000\n\n$ glc clean -r us-west-2\n2021/03/04 20:42:46 Scanning AWS environment in us-west-2.....\n2021/03/04 20:42:46 ............\n```\n\n## GitHub Actions Cron\n\ngo-lambda-cleanup is a good fit for cron jobs. Below is an example snippet for how you can setup a cron job through GitHub Actions.\n\n```yml\nname: Nightly Lambda Version Cleanup\n\non:\n  schedule:\n    # At 04:00 on every day\n    - cron: '0 04 * * *'\nenv:\n  VERSION: 'v2.0.19'\n\njobs:\n  build:\n    name: Run go-lambda-cleanup\n    runs-on: ubuntu-latest\n    steps:\n\n      - name: Pull Docker Image\n        run: docker pull ghcr.io/karl-cardenas-coding/go-lambda-cleanup:$VERSION\n\n\n      - name: Run go-lambda-cleanup in Test\n        env:\n          AWS_ACCESS_KEY_ID: ${{secrets.AWS_TEST_ACCESS_KEY}}\n          AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_TEST_SECRET_ACCESS_KEY}}\n          REGION: us-east-1\n        run: docker run -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ghcr.io/karl-cardenas-coding/go-lambda-cleanup:$VERSION clean -r $REGION\n\n      - name: Run go-lambda-cleanup in Prod\n        env:\n          AWS_ACCESS_KEY_ID: ${{secrets.AWS_PROD_ACCESS_KEY}}\n          AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_PROD_SECRET_ACCESS_KEY}}\n          REGION: us-east-1\n        run: docker run -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ghcr.io/karl-cardenas-coding/go-lambda-cleanup:$VERSION clean -r $REGION\n```\n\n## Contributing to go-lambda-cleanup\n\nFor a complete guide to contributing to go-lambda-clean, please review the [Contribution Guide](documentation/CONTRIBUTING.md).\n\nContributions to go-lambda-cleanup of any kind are welcome. Contributions include, but not limited to; documentation, organization, tutorials, blog posts, bug reports, issues, feature requests, feature implementations, pull requests, answering questions on the forum, helping to manage issues, etc.\n\n## FAQ\n\n---\n\u003ctable\u003e\u003ctr\u003e\n\nQ: On MacOS I am unable to open the binary due to Apple not trusting the binary. What are my options?\n\nA: You have four options. \n\n- Option A (Recommended) is to use the Docker container. Please review the [Docker steps](#docker).\n\n- Option B is to to grant permission for the application to run. Use [this guide](https://support.apple.com/en-us/HT202491) to help you grant permission to the application.\n\n- Option C is not recommended but it's an avaiable option. You can remove the binary from quarantine mode. \n  ```shell\n  xattr -d com.apple.quarantine /path/to/file\n  ```\n- Option D is to clone this project and compile the binary. Issue `go build -o glc`, and the end result is a binary compatible for your system. If you still encounter issues after this, invoke the code signing command on the binary `codesign -s -`\n---\n\nQ: This keeps timing out when attempting to connect to AWS and I have verified my AWS credentials are valid?\n\nA: This could be related to a corporate firewall. If your organization has a proxy endpoint configure the proxy environment variable with the correct proxy endpoint. Consult your organization's networking team to learn more about the proper proxy settings.\n\n---\n\nQ: I don't want to execute this command without understanding exactly what it will do. Is there a way to preview the actions?\n\nA: Yes, leverage the dry run mode. Dry run can be invoked through the `-d`, `--dryrun` flag.\n\n---\n\n\u003c/tr\u003e\u003c/table\u003e\n\n## Helpful Links\n[AWS Credentials Configuration](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)\n\n[Golang Cobra CLI Framework](https://github.com/spf13/cobra)\n\n[AWS Go SDK Credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html)\n\n# Open Source Licenses\n\nFor a list of all open source packages and software used, check out the open source [acknowledgment](./documentation/open-source.md) resource page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarl-cardenas-coding%2Fgo-lambda-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarl-cardenas-coding%2Fgo-lambda-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarl-cardenas-coding%2Fgo-lambda-cleanup/lists"}