{"id":36703463,"url":"https://github.com/ryane/aws-keymaster","last_synced_at":"2026-01-12T11:40:26.558Z","repository":{"id":57602999,"uuid":"44031089","full_name":"ryane/aws-keymaster","owner":"ryane","description":"Imports an EC2 keypair to all AWS regions","archived":false,"fork":false,"pushed_at":"2015-10-11T16:08:50.000Z","size":152,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T03:27:03.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ryane.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":"2015-10-10T22:42:58.000Z","updated_at":"2018-11-16T11:30:56.000Z","dependencies_parsed_at":"2022-09-26T20:01:41.240Z","dependency_job_id":null,"html_url":"https://github.com/ryane/aws-keymaster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryane/aws-keymaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryane%2Faws-keymaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryane%2Faws-keymaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryane%2Faws-keymaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryane%2Faws-keymaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryane","download_url":"https://codeload.github.com/ryane/aws-keymaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryane%2Faws-keymaster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-01-12T11:40:26.487Z","updated_at":"2026-01-12T11:40:26.545Z","avatar_url":"https://github.com/ryane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Keymaster\n\n[![Build Status](https://travis-ci.org/ryane/aws-keymaster.svg)](https://travis-ci.org/ryane/aws-keymaster)\n\nA simple utility that allows you import a public key into all AWS regions with a single command.\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again --\u003e\n**Table of Contents**\n\n- [AWS Keymaster](#aws-keymaster)\n    - [Building](#building)\n    - [Configuring](#configuring)\n    - [Running](#running)\n        - [Import a public key into all regions](#import-a-public-key-into-all-regions)\n        - [Delete a named keypair from all regions](#delete-a-named-keypair-from-all-regions)\n        - [Dry Runs](#dry-runs)\n        - [Running from Docker](#running-from-docker)\n    - [License](#license)\n\n\u003c!-- markdown-toc end --\u003e\n\n## Building\n\nUse the `Makefile` to build `aws-keymaster`:\n\n```shell\nmake build\n```\n\nTo build a docker container:\n\n```shell\ndocker build -t aws-keymaster .\n```\n\n## Configuring\n\nBefore running `aws-keymaster`, you need to ensure that you have configured access to your AWS account. You can do so by using the [AWS CLI](https://aws.amazon.com/cli/) to [configure](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) your development machine. Alternatively, you can configure credentials by creating a file called `~/.aws/credentials` with contents that look something like this:\n\n```\n[default]\naws_access_key_id = AKID1234567890\naws_secret_access_key = MY-SECRET-KEY\n```\n\nOr, you can use environment variables to configure your credentials.\n\n```\nAWS_ACCESS_KEY_ID=AKID1234567890\nAWS_SECRET_ACCESS_KEY=MY-SECRET-KEY\n```\n\nAmazon has a [blog post](http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs) with more information about how to configure your AWS credentials.\n\nThe credentials you use must be associated with an [IAM user](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ec2-api-permissions.html) that has sufficient [permissions](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ec2-api-permissions.html) to import keypairs in all regions.\n\n## Running\n\n```shell\nUsage:\n  aws-keymaster [command]\n\nAvailable Commands:\n  import      Imports a public key into all AWS regions\n  delete      Deletes a keypair from all AWS regions\n  version     Display the version of aws-keymaster\n\nFlags:\n      --dry-run[=false]: Checks whether you have the required permissions, without attempting the request\n  -h, --help[=false]: help for aws-keymaster\n\nUse \"aws-keymaster [command] --help\" for more information about a command.\n```\n\n### Import a public key into all regions\n\n```shell\nImports a public key with the specified name and public key to all AWS regions\n\nUsage:\n  aws-keymaster import [name] [public key file] [flags]\n\nGlobal Flags:\n      --dry-run[=false]: Checks whether you have the required permissions, without attempting the request\n```\n\nTo import a public key to all regions, you use the `import` command. It requires two arguments: the name of the key pair and the path to the public key on your file system.\n\n```shell\n./bin/aws-keymaster import mykey ~/.ssh/id_rsa.pub\neu-west-1:       Imported keypair 'mykey' - 57:bf:37:68:69:18:29:aa:4d:da:f7:1b:e6:28:4e:e8\nap-southeast-1:  Imported keypair 'mykey' - 57:bf:37:68:69:18:29:aa:4d:da:f7:1b:e6:28:4e:e8\n...\n```\n\nIf you do not pass in those arguments, `aws-keymaster` will prompt you for them.\n\n```shell\n./bin/aws-keymaster import\nKey Name: mypubkey\nPublic key [/Users/ryan/.ssh/id_rsa.pub]:\n\neu-west-1:       Imported keypair 'mypubkey' - 57:bf:37:68:69:18:29:aa:4d:da:f7:1b:e6:28:4e:e8\n...\n```\n\n### Delete a named keypair from all regions\n\n```shell\nDeletes a keypair with the specified name from all AWS regions\n\nUsage:\n  aws-keymaster delete [name] [flags]\n\nFlags:\n  -f, --force[=false]: Delete keypairs without prompting\n\nGlobal Flags:\n      --dry-run[=false]: Checks whether you have the required permissions, without attempting the request\n```\n\nTo delete a keypair called `keypairname` from all regions, you can use the `delete` subcommand:\n\n```shell\n./bin/aws-keymaster delete keypairname\nAre you sure you want to delete keypair 'testing'? (yes/no) [no]: yes\neu-west-1:       Deleted keypair 'keypairname'\nap-southeast-1:  Deleted keypair 'keypairname'\n...\n```\n\nYou can delete a keypair without prompting by using the `--force` flag:\n\n```shell\n./bin/aws-keymaster delete keypairname --force\n```\n\n### Dry Runs\n\nFor both the `import` and `delete` commands, you can use the `--dry-run` flag to confirm that your AWS credentials have the sufficient permissions to perform the operations:\n\n```shell\n./bin/aws-keymaster import mykey ~/.ssh/id_rsa.pub --dry-run\n[Dry Run] eu-west-1:       Imported keypair 'mykey'\n[Dry Run] ap-southeast-1:  Imported keypair 'mykey'\n...\n```\n\n### Running from Docker\n\nIf you are running `aws-keymaster` from a docker container, you will likely need to use a volume mount in order to be able to specify a public key on the local file system. In addition, you may need to use environment variables to pass in your AWS credentials. The example below illustrates how to use the docker container to run the `import` command:\n\n```shell\ndocker run --rm -it -v ~/.ssh/:/ssh -e \"AWS_ACCESS_KEY_ID=AKID1234567890\" -e \"AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY\" ryane/aws-keymaster import dockertest /ssh/id_rsa.pub\n```\n\n## License\n\n`aws-keymaster` is released under the Apache 2.0 license (see [LICENSE](LICENSE))\n\n![The Keymaster](https://media.giphy.com/media/DMDC9TiivFhm/giphy.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryane%2Faws-keymaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryane%2Faws-keymaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryane%2Faws-keymaster/lists"}