Installation guide

'RangeKeyElement' => array('N' => $date->format('j'))
)
))->getResult()->getPath('Item/flavors/SS');
// Generate the message
$today = $date->format('l, F jS');
$message = "It's {$today}, and here are our flavors of the day:\n";
foreach ($flavors as $flavor) {
$message .= "- {$flavor}\n";
}
$message .= "\nCome visit Mr. Foo\'s Ice Cream Parlor on 5th and Pine!\n";
echo "{$message}\n";
// Send today's flavors to subscribers using Version 1 of the SDK
$response = $sns->publish('flavors-of-the-day-sns-topic', $message, array(
'Subject' => 'Flavors of the Day - Mr. Foo\'s Ice Cream Parlor'
));
if ($response->isOK()) {
echo "Sent the flavors of the day to your subscribers.\n";
} else {
echo "There was an error sending the flavors of the day to your subscribers.\n";
}
Final Notes
Remember that instantiating clients from the original SDK using the service builder from AWS SDK for PHP
does not change how those clients work. For example, notice the differences in response handling between SDK
versions. For a full list of differences between the versions, please see the Migration Guide.
For more information about using the original version of the SDK, please see the Version 1 API Documentation and
the Version 1 SDK README.
Providing Credentials to the SDK
Introduction
In order to authenticate requests, AWS services require you to provide your AWS access keys, also known as your
AWS access key ID and secret access key. In the AWS SDK for PHP, these access keys are often referred to
collectively as your credentials. This guide demonstrates how to provide your credentials to the AWS SDK for SDK.
There are many ways to provide credentials:
1. Using credentials from environment variables
2. Using IAM roles for Amazon EC2 instances
3. Using a configuration file with the service builder
4. Passing credentials into a client factory method
5. Setting credentials after instantiation
6. Using temporary credentials from AWS STS
Which technique should you choose?
The technique that you use to provide credentials to the SDK for your application is entirely up to you. Please read
each section on this page to determine what is the best fit for you. What you choose will depend on many different
factors, including:
• The environment you are operating in (e.g., development, testing, production)
• The host of your application (e.g., localhost, Amazon EC2, third-party server)
Providing Credentials to the SDK
19