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

Trouble to try the samples in my S3 account #331

Closed
EUtrilla2002 opened this issue Jul 11, 2023 · 5 comments
Closed

Trouble to try the samples in my S3 account #331

EUtrilla2002 opened this issue Jul 11, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@EUtrilla2002
Copy link

Describe the issue

I'm trying to run the samples given ,however i don't know what i'm doing wrong by running this line of code.Previously I added my key and secret key as environment variable as "AWS_ACCESS_KEY_ID" and"AWS_SECRET_ACCESS_KEY" .

I tried to run this command in the Ubuntu CLI

aws-c-s3/build/samples/s3/s3 ls s3://pruebaxpn --region us-west-2

However,this error pops up:

Failure while listing objects. Please check if you have valid credentials and s3 path is correct. Error: aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid response status from request

What I'm doing wrong? Thank you in advance

Links

https://github.com/awslabs/aws-c-s3#readme

@EUtrilla2002 EUtrilla2002 added the documentation Improvements or additions to documentation label Jul 11, 2023
@yasminetalby
Copy link
Contributor

Hello @EUtrilla2002 ,

Thank you very much for your submission.
Could you check the following:

  1. pruebaxpn is an existing bucket (no syntax error) and is located in region us-west-2
  2. The credentials provided as environment variables are valid and not expired
  3. Potentially check if you have not set a different region as environment variable

Best regards,

Yasmine

@yasminetalby yasminetalby self-assigned this Jul 11, 2023
@TingDaoK
Copy link
Contributor

you can also do aws-c-s3/build/samples/s3/s3 ls s3://pruebaxpn --region us-west-2 -v DEBUG to get the debug level logs.

@EUtrilla2002
Copy link
Author

Hello,thank you for answering
The bucket address,looking at the debug log,is correct.However something strange happens.
I created new credentials but it gets me this message :

imagen

It seems that the credentials are "expired" (i have created them 15 min ago and changed the enviromental values) and creates another ones?

The final error log is this one:

[ERROR] [2023-07-12T09:56:01Z] [00007fad0c5ff640] [S3MetaRequest] - id=0x55dff92aac70 Meta request cannot recover from error 14343 (Invalid response status from request). (request=0x7fad04001150, response status=403)

This is my first time using S3 systems for an end-of-degree proyect so i'm a little lost here , help is much apreciated !

@yasminetalby
Copy link
Contributor

Hello @EUtrilla2002 ,

Expired credentials are invalid so the behavior you are experiencing is expected. The request fails because of this hence the error message
[ERROR] [2023-07-12T09:56:01Z] [00007fad0c5ff640] [S3MetaRequest] - id=0x55dff92aac70 Meta request cannot recover from error 14343 (Invalid response status from request). (request=0x7fad04001150, response status=403).

How are you creating and setting up your environment credentials? I am assuming that you are following the IAM roles for Amazon EC2 documentation.
If you are using Assume Role. You can specify the maximum session duration for a role using the AWS Management Console or by using the AWS CLI or AWS API. When you use an AWS CLI or API operation to assume a role, you can specify a value for the DurationSeconds parameter. You can use this parameter to specify the duration of the role session, from 900 seconds (15 minutes) up to the maximum session duration setting for the role. (See documentation).
This blog post is also a great resource to troubleshoot temporary security credential expiration using the AWS CLI.

If your use case is different could you please provide more detail regarding your credential set up steps?

Could you also please provide the full log around the error rather than a snippet? The log provided don't capture the error/logging leading to the error.

Thank you very much for your time and collaboration!
Best regards,

Yasmine

@EUtrilla2002
Copy link
Author

Hi,sorry for the delay. It was a problem with the credentials :) i didn't put the administrator role

Thank you so much for the help!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants