{"id":15048313,"url":"https://github.com/github/fog-aws","last_synced_at":"2025-10-04T08:31:59.377Z","repository":{"id":65974838,"uuid":"89509123","full_name":"github/fog-aws","owner":"github","description":"Module for the 'fog' gem to support Amazon Web Services http://aws.amazon.com/","archived":true,"fork":true,"pushed_at":"2017-04-26T17:46:17.000Z","size":1689,"stargazers_count":5,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-30T00:23:39.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"fog/fog-aws","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-26T17:33:07.000Z","updated_at":"2024-07-31T03:20:05.000Z","dependencies_parsed_at":"2023-02-19T18:15:20.288Z","dependency_job_id":null,"html_url":"https://github.com/github/fog-aws","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ffog-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ffog-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ffog-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Ffog-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/fog-aws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235232860,"owners_count":18957059,"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-09-24T21:10:39.630Z","updated_at":"2025-10-04T08:31:58.632Z","avatar_url":"https://github.com/github.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fog::Aws\n\n![Gem Version](https://badge.fury.io/rb/fog-aws.svg)\n[![Build Status](https://travis-ci.org/fog/fog-aws.svg?branch=master)](https://travis-ci.org/fog/fog-aws)\n[![Dependency Status](https://gemnasium.com/fog/fog-aws.svg)](https://gemnasium.com/fog/fog-aws)\n[![Test Coverage](https://codeclimate.com/github/fog/fog-aws/badges/coverage.svg)](https://codeclimate.com/github/fog/fog-aws)\n[![Code Climate](https://codeclimate.com/github/fog/fog-aws.svg)](https://codeclimate.com/github/fog/fog-aws)\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'fog-aws'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install fog-aws\n\n## Usage\n\nBefore you can use fog-aws, you must require it in your application:\n\n```ruby\nrequire 'fog/aws'\n```\n\nSince it's a bad practice to have your credentials in source code, you should load them from default fog configuration file: ```~/.fog```. This file could look like this:\n\n```\ndefault:\n  aws_access_key_id:     \u003cYOUR_ACCESS_KEY_ID\u003e\n  aws_secret_access_key: \u003cYOUR_SECRET_ACCESS_KEY\u003e\n```\n\n### Connecting to EC2 service\n```ruby\nec2 = Fog::Compute.new :provider =\u003e 'AWS', :region =\u003e 'us-west-2'\n```\n\nYou can review all the requests available with this service using ```#requests``` method:\n\n```ruby\nec2.requests # =\u003e [:allocate_address, :assign_private_ip_addresses, :associate_address, ...]\n```\n\n### Launch an EC2 on-demand instance:\n\n```ruby\nresponse = ec2.run_instances(\n  \"ami-23ebb513\",\n  1,\n  1,\n  \"InstanceType\"  =\u003e \"t1.micro\",\n  \"SecurityGroup\" =\u003e \"ssh\",\n  \"KeyName\"       =\u003e \"miguel\"\n)\ninstance_id = response.body[\"instancesSet\"].first[\"instanceId\"] # =\u003e \"i-02db5af4\"\ninstance = ec2.servers.get(instance_id)\ninstance.wait_for { ready? }\nputs instance.public_ip_address # =\u003e \"356.300.501.20\"\n```\n\n### Terminate an EC2 instance:\n\n```ruby\ninstance = ec2.servers.get(\"i-02db5af4\")\ninstance.destroy\n```\n\nFog::AWS is more than EC2 since it supports many services provided by AWS. The best way to learn and to know about how many services are supported is to take a look at the source code. To review the tests directory and to play with the library in ```irb``` can be very helpful resources as well.\n\n## Contributing\n\n1. Fork it ( https://github.com/fog/fog-aws/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ffog-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Ffog-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Ffog-aws/lists"}