Created
January 20, 2017 12:29
-
-
Save hsuh/dc15110a2e5c75b239956c8e3a3538a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url - https://forums.aws.amazon.com/message.jspa?messageID=671934 | |
You could verify that they match a regular expression that describes every access key and every secret key (the AWS Security Blog has regexes you could use), but there's no way for the SDK to check if your credentials are valid without sending a request to a service. (Otherwise, the SDK would need to ship with everyone's access keys embedded in its source.) | |
If you do make a call to a service, though, the remote service will be able to validate your credentials and respond accordingly. If you call $s3Client->listBuckets() before calling $s3Client->registerStreamWrapper(), the client will call the service and convert the error to an exception if your credentials are invalid. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment