-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Curl Error 7 But Aws Cli Works #1920
Comments
Switched the credential provider to use ecsCredentials but still getting a 404.
|
But if I do |
I have followed the advice posted by aws on this issue here: https://forums.aws.amazon.com/thread.jspa?threadID=273767 The two suggested workarounds do not help with the sdk. This first option worked for getting the aws cli working but that is it.
This solution did not work as well
|
Hi @mdeering24, thanks for reaching out to us. If you're relying on instance profile credentials, this behavior is likely caused by recent changes in the Instance Metadata Service. You should be able to use EC2's ModifyInstanceMetadataOptions call to increase the hop limit to allow the SDK to retrieve instance profile credentials from IMDS as expected. |
I got the same error with @mdeering24 It makes me crazy :( |
hi @diehlaws , we are using ECS Fargate, no any ec2 instance here. how could be ? |
Hi @at-bachhuynh, I actually figured out my issue and forgot to post the solution and close this ticket. We were running a monolithic application in the container with Supervisor as a wrapper for everything. The two steps that we did to overcome this issue were:
|
Hi @mdeering24 |
here is the result of command:
And I see that the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is available But my application still get error:
Could you please take a look? @mdeering24 @diehlaws |
Why is this closed, this still seems to be an issue. Your steps are very helpful @mdeering24 but this should surely be working without having to make these convoluted steps? |
Turns out that those steps don't work anyway, I believe it's simply due to the fact that /root/.profile won't be run when apache2 fires off against php-fpm. |
Looks like things were moved to aws/aws-sdk-php-laravel#176 Which is a bit weird since this is a general sdk error, not laravel specific |
I ended up putting this in my entrypoint, super hacky, but I hope it can help people until this issue is properly fixed.
|
I also have this error. artisan commands that interacts with aws services works fine whereas fpm fails. |
We have our application in ECS FARGATE.
We are trying to have our application retrieve a secret from the SecretsManager. The sdk is getting a permission error while the aws cli is working and able to retrieve the secret fine.
Our application sets up a container with the secrets manager inside it:
We then have a Command Bus call on the SecretsManager:
Can you please help me understand why this issue is happening. Does Fargate store role credentials in a different area? Does the sdk not check that area?
My current understanding of the sdk is that it will know to curl the container/instance metadata for the credentials but that obviously doesn't seem to be the case.
The text was updated successfully, but these errors were encountered: