When I call SesV2Client.listContacts, I always get the issue below:
software.amazon.awssdk.services.sesv2.model.SesV2Exception: 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. (Service: SesV2, Status Code: 403, Request ID: 3d6650d8-8f25-457a-9e25-cfc0483021d4)
I am using the right access key and secret key under my IAM user. Can someone help take a look why? Thanks.
Code is below:
SesV2Client client = SesV2Client.builder()
.region(Region.US_WEST_1)
.build();
try {
ListContactsRequest request = ListContactsRequest.builder()
.contactListName("mylistname")
.pageSize(pageSize)
.build();
ListContactsResponse response = client.listContacts(request);
} ....