Archive

[AWS][Boto3][Solution] InvalidSignatureException Error 본문

------- DE -------/Cloud

[AWS][Boto3][Solution] InvalidSignatureException Error

enent 2022. 11. 18. 22:49
반응형
Enviornment : Amazon Linux 2 / Python 3.7.*

 

 

Problem

Boto3 Library 활용 시 Access key, Secret access key 를 통한 인증을 시도할 때 InvalidSignatureException 발생

botocore.exceptions.ClientError: An error occurred (InvalidSignatureException) when calling the LookupEvents operatation : The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

 

 

Solution

Secret Key 에 특정 문자가 포함되었을 떄 발생하는 에러로 IAM Credential 재발급을 통해 해결 가능.

 

 

 

AWS 라이브러리의 SignatureDoesNotMatch 해결 방법

AWS 클라이언트를 이용할 때 발생한 SignatureDoesNotMatch 에러의 원인과 해결 방법.

lynlab.co.kr

위의 글에선 CentOS 에서 /, % 가 포함되었을 때 발생한다고 했으나, 현 시점 Amazon Linux 2 기준 +, = 가 포함된 상황에서 에러가 발생했다. (해당 케이스의 경우 ~/.aws/credentails 내 aws_secret_access_key==+imroH ~~~ 이 되는 상황이었음)

 

 

 

 

 

 

Reference
https://lynlab.co.kr/blog/52

 

반응형
Comments