Help us understand the problem. What is going on with this article?

VagrantでAWSを利用する

More than 5 years have passed since last update.

vagrant-awsのインストール

VagrantでAWSを利用するにはvagrant-awsというナイスなプラグインがある。

vagrant plugin install vagrant-aws

使い方はGitHubで。

Vagrantfileの設定

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "dummy"
  config.vm.provider :aws do |aws, override|
    aws.access_key_id = "ACCESS KEY"
    aws.secret_access_key = "SECRET ACCESS KEY"
    aws.keypair_name = "KEYPAIR"
    aws.ami = "ami-a1124fa0"
    aws.region = "ap-northeast-1"
    override.ssh.username = "ubuntu"
    override.ssh.private_key_path = "/path/to/aws.pem"
  end

  config.vm.define "host1" do |m|
    m.vm.provider :aws do |aws, override|
      aws.instance_type = "t2.micro"
      aws.security_groups = ["default"]
    end
  end

end

Acess Key IDとSecret Access Keyが分からない場合は、AWSのヘルプを参照。

ami-a1124fa0はUbuntu 14.04 LTS 64bit。

インスタンスを立ち上げてみる

vagrant up --provider aws host1

実行の後、AWS Management ConsoleのEC2のInstancesで、新しいインスタンスが立ち上がっているのが確認できる。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした