Closed matteokov closed 9 months ago
Hey @matteokov 👋
Yeah, RR tries to perform a call to the well-known local URL to check if it is running inside AWS environment.
The global sqs
key ignored in that case (which might be a wrong decision btw).
I'll double-check that behavior because configuration from inside AWS is managed by the AWS Golang package...
@rustatian thanks for a fast response :)
Regarding the global sqs
key, I think that a better flow would be to always respect the explicitly provided configuration
So priority would be:
sqs
key and there are credentials/configs provided, use themLet me know if you need any additional info regarding the endpoint region issue.
Yeah, I'm currently verifying your info, but anyway, in 2024.1 I'll update this behavior (since this is a BC).
@matteokov Could you please try to set AWS_REGION
env variable and restart RR?
@rustatian This fixed an issue and RoadRunner started normally
It looks like a bug in the AWS GO SDK, I found an issue stating about the same problem.
But, I found a way how to support both, the global sqs
config with the data provided by the IAM.
Ok, since I can't control the changed behavior in the AWS SDK, the global configuration would be able to override the existing IAM values since the next bugfix version (2023.3.9)
The fix will be released next Thursday.
No duplicates 🥲.
What happened?
After I moved my application to EC2 I started getting an error when
GetQueueUrl
is performed:sqs..amazonaws.com: no such host
.It looks like the region part is missing from the endpoint. If I try to override an endpoint with
sqs
config key, this is ignored and the same error occurs.If I understood correctly, Inside the EC2 instance, RoadRunner should look for identity by sending a request to
http://169.254.169.254/latest/dynamic/instance-identity/
. Later, AWS Go SDK should fetch credentials from EC2 and use them to perform requests to SQS.To debug, I sent a request to
http://169.254.169.254/latest/dynamic/instance-identity/document
from inside the instance and I can see that my region iseu-central-1
.I'm using Symfony and
baldinof/roadrunner-bundle
but this shouldn't be relevant to reproduce an issue as it fails before even reaching PHP/Symfony.Version (rr --version)
Tested on both 2023.3.6 and 2023.3.8
How to reproduce the issue?
RoadRunner config:
Run the application in EC2 instance with PHP version 8.2
Relevant log output