Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-android-sdk-logs error #453

Closed
eashevchenko opened this issue Apr 25, 2018 · 6 comments
Closed

aws-android-sdk-logs error #453

eashevchenko opened this issue Apr 25, 2018 · 6 comments
Labels
bug Something isn't working cloudwatch Issues with the AWS Android SDK for CloudWatch

Comments

@eashevchenko
Copy link

eashevchenko commented Apr 25, 2018

When i ve tried to send logs from Android client to Cloudwatch i ve received next error:

com.amazonaws.AmazonServiceException: Credential should be scoped to correct service: 'logs'. (Service: AmazonCloudWatchLogs; Status Code: 400; Error Code: InvalidSignatureException;

i m using aws-android-sdk-logs library.
Client has access and secret key, i ve setted correct region...
What i m doing wrong ?

@mutablealligator
Copy link
Contributor

Thank you @eashevchenko for reporting to us. What version of SDK are you using? Can you share a code snippet and the stacktrace?

@eashevchenko
Copy link
Author

I m using aws-android-sdk-logs:2.6.18 . And i have implemented client like this: https://stackoverflow.com/questions/36876563/amazon-cloud-watch-log-putlogeventsrequest-the-given-sequencetoken-is-invali

@rohandubal rohandubal added bug Something isn't working and removed investigating labels Apr 30, 2018
@rohandubal
Copy link
Contributor

rohandubal commented Apr 30, 2018

Hello @eashevchenko

This is a bug due to incorrect configuration for signer. It will be fixed in next release of the SDK.

Thanks,
Rohan

@olehspavl
Copy link

Before Rohan fix that you can use a temporal solution: set ServiceName directly.
The issue is that AmazonCloudWatchLogsClient use wrong service name.
By def service name will be initialized using def httpClientName. To avoid it you can set ServiceName by yourself:

AmazonCloudWatchLogsClient client =  new AmazonCloudWatchLogsClient(credential);
client.setServiceNameIntern("logs");
// .. use client after ..

@rohandubal
Copy link
Contributor

You are right @olehspavl

Thats a good work-around till we have the release out!

@mutablealligator mutablealligator self-assigned this May 9, 2018
@minbi
Copy link
Contributor

minbi commented May 11, 2018

Fixed in version 2.6.19

@palpatim palpatim added cloudwatch Issues with the AWS Android SDK for CloudWatch and removed CloudWatch Logs labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cloudwatch Issues with the AWS Android SDK for CloudWatch
Projects
None yet
Development

No branches or pull requests

6 participants