Home Vagrant : An AMI must be configured via "ami" (region: #{region})
Reply: 0

Vagrant : An AMI must be configured via "ami" (region: #{region})

user1089 Published in April 22, 2018, 1:00 am

I got an error as below when run vagrant command,

 # vagrant up --provider=aws

There are errors in the configuration of this machine. Please fix the following errors and try again:

AWS Provider: * An AMI must be configured via "ami" (region: #{region})

I'm using Vagrant 2.0.1 with vagrant-aws 0.7.2

Vagrant file:

Vagrant.configure("2") do |config|
    require 'vagrant-aws'
    Vagrant.configure('2') do |config|
        config.vm.box = 'Vagarent'
        config.vm.provider 'aws' do |aws, override|
        aws.access_key_id = "xxxxxxxxxxxxxxxxxx"
        aws.secret_access_key = "xxxxxxxxxxxxxxxxxxxxxxxx"
        aws.keypair_name = 'ssh-keypair-name'
        aws.instance_type = "t2.micro"
        aws.region = 'us-west-2a'
        aws.ami = 'ami-1122298f0'
        aws.security_groups = ['default']
        override.ssh.username = 'ubuntu'
        override.ssh.private_key_path = '~/.ssh/ssh-keypair-file'

How to solve it?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30376 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO