We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First request to http://169.254.169.254/latest/meta-data/iam/security-credentials/ return role name, but credentials is expected. Second request returns credentials. In my case working function is:
private function getInstanceProfileCredentials() { $url = self::EC2_SERVER_URI.self::CRED_PATH; $curl_result = $this->curl($url); $response = trim($curl_result['content']); $url = self::EC2_SERVER_URI.self::CRED_PATH.$response; $curl_result = $this->curl($url); $response = $curl_result['content']; $result = $this->decodeResult($response); return [ 'key' => $result['AccessKeyId'], 'secret' => $result['SecretAccessKey'], 'token' => $result['Token'], 'expiration' => strtotime($result['Expiration']), ]; }
The text was updated successfully, but these errors were encountered:
I can confirm the above worked for me as well as I just ran into this issue.
Sorry, something went wrong.
No branches or pull requests
First request to http://169.254.169.254/latest/meta-data/iam/security-credentials/ return role name, but credentials is expected.
Second request returns credentials. In my case working function is:
The text was updated successfully, but these errors were encountered: