- Copy the files to Application/libraries
- Run composer update command
- Edit Application/config.php and add following
$config['aws_access_key_id'] = 'xxxxxxx'; // Replace xxx Your Amazon Access Key ID
$config['aws_secret_access_key'] = 'yyyyy'; // replace your yyy with Amazon Access Key
$config['aws_access_sqs_url'] = 'https://sqs.ca-central-1.amazonaws.com/xxxxxx/yyyy'; // This will be found from your SQS Console.
$config['aws_region'] = 'ca-central-1'; // Change per need
$config['aws_profile'] = 'default'; // change per need
$config['aws_version'] = 'latest'; // change per need
Your codeigniter application is easy to setup with library. You need to make sure you setup the config.php properly. This is the very first step. Afterwards, you can use following code to call the request.
$this->load->library('amazon_sqs');
$message = 'ABCD';
$attributes = array(); // optional, 2d array of attributes. e.g. ["TicketSubject" => ['DataType' => "String",'StringValue' => "Some test ticket subject"], "TicketID" => ['DataType' => "Number", 'StringValue' => "12069607"]]
$delay = 0;
$result = $this->amazon_sqs->createTicket($message, $attributes, $delay);
print_r($result); // You will notice the debug data available in response for further proceeding or troubleshooting.
Any changes in documentation or code is acceptable. Bugs can be reported as well. I will be happier to assist when and where required...!