methods/ec_common.rb
# Initiate an EWS EC2 KeyPair connection
Initiate an EWS EC2 KeyPair connection
Initiate an EWS EC2 KeyPair connection
def initiate_aws_ec2_resource(options)
  begin
    ec2 = Aws::EC2::KeyPair.new(
      :region             =>  options['region'], 
      :access_key_id      =>  options['access'],
      :secret_access_key  =>  options['secret']
    )
  rescue Aws::Errors::NoSuchEndpointError
    handle_output(options,"Warning:\tInvalid region, or keys")
  end
  return ec2
end
def initiate_aws_ec2_resource ( options ) begin ec2 = Aws :: EC2 :: KeyPair . new ( :region => options [ 'region' ] , :access_key_id => options [ 'access' ] , :secret_access_key => options [ 'secret' ] ) rescue Aws :: Errors :: NoSuchEndpointError handle_output ( options , "Warning:\tInvalid region, or keys" ) end return ec2 end
Initiate an EWS EC2 KeyPair connection
Initiate an EWS EC2 KeyPair connection
options
<not_specific>