Today I Learned: 18/10/2024 - Getting more info on AWS configuration errors via the browser dev tools
I occasionally receive an error when using Pulumi or the AWS console to set up AWS infrastructure. These errors are unfortunately often not particular helpful in determining what the problem might be.
I took an excellent tip from this Stack Overflow post - since the AWS console is web based, the page is ultimately likely to make a REST request to take action and the response from the request may have more information in it than the console page or Pulumi invocation displays.
My most recent such error was in setting up an SQS notification when a new object was uploaded to an S3 bucket. Both Pulumi and the AWS S3 console displayed an error much like this:
InvalidArgument: Unable to validate the following destination configurations:
ARN_OF_SQS_QUEUE
Inspecting the network traffic from the AWS console page got me more info though, a response that looked like this:
<Error>
<Code>
InvalidArgument
</Code>
<Message>
Unable to validate the following destination configurations
</Message>
<ArgumentName1>
ARN_OF_SQS_QUEUE
</ArgumentName1>
<ArgumentValue1>
Permissions on the destination queue do not allow S3 to publish notifications from this bucket
</ArgumentValue1>
<RequestId>
REQUEST_ID
</RequestId>
<HostId>
HOST_ID
</HostId>
</Error>
This was enough extra info to figure out the problem.
TL;DR If you’re getting less-than-useful errors from AWS during configuration, your browser’s dev tools may have access to more detailed information.