question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix S3 authentication for IAM roles by including Session token in env vars

See original GitHub issue

Description A clear and concise description of what the bug is. Triton server does not read SESSION_TOKEN environment variable that is required when using IAM roles and temp credentials. Please see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html for more information. S3 resources cannot be accessed by triton even though they are accessible from command line. (Docker containers are usually provisioned with IAM roles and use temporary credentials)

Triton Information What version of Triton are you using? r20.10 Are you using the Triton container or did you build it yourself? Used the container To Reproduce Steps to reproduce the behavior.

Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well).

Expected behavior A clear and concise description of what you expected to happen. tritonserver --model-repository=s3://path/to/model_repo This fails with cannot read metadata for Bucket However aws s3 ls s3://path/to/model_repo works

The solution is to include AWS_SESSION_TOKEN when available and I have created a PR here for the same: https://github.com/triton-inference-server/server/pull/2290

Please merge this if it looks good as I suspect this will resolve a lot of s3 access issues.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
CoderHamcommented, Mar 9, 2022

@TomasGajarsky we have noted your request to this enhancement.

@efog Can you try with a recent version of Triton Inference Server? 21.03 is nearly a year old. We updated the version of aws-sdk-cpp used in Triton 8 months ago.

If you see the issue with the new Triton release as well please open a new ticket for the same with necessary details for us to triage the issue

0reactions
kthuicommented, Dec 16, 2022

Hi, we have added a test to check the functionality of temporary credential for AWS, and the test is passing. If you are still facing issue with session token, please take a look into the test that starts from L345 towards the end of the script to see if that is the same use-case as yours. If not, please file a separate GitHub issue, so we can follow-up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using temporary credentials with AWS resources
To use temporary security credentials in code, you programmatically call an AWS STS API like AssumeRole and extract the resulting credentials and session...
Read more >
Authenticating to AWS with Environment Variables
Another way to authenticate to AWS on the CLI is to set your Access Keys as the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY :...
Read more >
Configuring the AWS SDK for Go V2
In the AWS SDK for Go V2, you can configure common settings for service clients, such as the logger, log level, and retry...
Read more >
AWS CLI Configuration Variables
Assume Role With Web Identity¶ · ~/.aws/config file, you can also configure a profile to indicate that the AWS CLI should assume a...
Read more >
How can I resolve the error "The security token included in the ...
Click on your username in the top nav, My Security Credentials · Click on Access Key Tab, Create New, copy the key and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found