I can successfully get list of EC2 instance.
using below code
$conf_aws = array();
$conf_aws['credentials']= array(
'key' => $config['AWS']['configkey'],
'secret' => $config['AWS']['configsecret'],
);
$conf_aws['region'] = 'ap-southeast-1';
$conf_aws['version']='latest';
$ec2Client = \Aws\Ec2\Ec2Client::factory($conf_aws);
$list = $ec2Client->DescribeInstances();
Can anybody suggest how to get list of reserved instance.
Use this edited code and it will work.
$conf_aws = array();
$conf_aws['credentials']= array(
'key' => $config['AWS']['configkey'],
'secret' => $config['AWS']['configsecret'],
);
$conf_aws['region'] = 'ap-southeast-1';
$conf_aws['version']='latest';
$ec2Client = \Aws\Ec2\Ec2Client::factory($conf_aws);
$list = $ec2->describe_reserved_instances_listing();