packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Setting PACKER_LOG doesn't output AWS API requests/responses

Open mpalmer opened this issue 3 years ago • 1 comments

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

When enabling debug logging in Packer, via PACKER_LOG, all AWS API requests and responses should be included in that log output, similar to the example output shown in the AWS Go SDK docs.

Use Case(s)

I'm trying to debug a subtle AWS-related issue with a Packer build. CloudTrail, as usual, is being less-than-helpful, and so I turn to the old standby -- examine exactly what is being sent to (and received from) AWS. I set PACKER_LOG=1, fire off my build, and at the very least I've got more data from which to construct a hypothesis.

I could also use these API calls to produce a minimal test case (that doesn't involve waiting for a whole build cycle) so that I can improve my debugging test cycle time.

Potential configuration

PACKER_LOG=1 packer build ...

Potential References

  • https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/making-requests.html#get-http-request-response -- how to enable request/response logging in an AWS client.

mpalmer avatar May 16 '22 23:05 mpalmer

Do you know any workaround? I need to see AWS API requests and responses.

marc1n avatar Jun 29 '22 11:06 marc1n