We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please specify whether your issue is about:
I'm running my code from rshiny server. The session token is provided using https://docs.aws.amazon.com/eks/latest/userguide/pod-configuration.html.
## Install package install.packages(c( "aws.ec2metadata", "aws.signature", "aws.s3", ), repos=c(cloudyr = "http://cloudyr.github.io/drat", getOption("repos")) ) # tried this: # install.packages("aws.s3", repos="https://rforge.net") # but the packages is not loaded ## load package library(aws.ec2metadata) library(aws.signature) library(aws.s3) ## Minimal example credentials <- aws.signature::locate_credentials() bucket_exist <- aws.s3::bucket_exists("name_of_my_bucket") cat(file=stderr(), paste0("AWS_DEFAULT_REGION: ", Sys.getenv("AWS_DEFAULT_REGION"), "\n")) cat(file=stderr(), paste0("Bucket exists: ", bucket_exist, "\n"))
The bucket_exists call fails with the error:
bucket_exists
Client error: (403) Forbidden Warning: Error in : Bucket name_of_my_bucket does not exist. ] Error : Bucket name_of_my_bucket does not exist.
The output of credentials shows the correct key id, secret, toke, and region.
credentials
The attached token is valid: running awscli from the same pod I can access the bucket without error.
awscli
platform = "x86_64-pc-linux-gnu" arch = "x86_64" os = "linux-gnu" system = "x86_64, linux-gnu" status = "" major = "4" minor = "2.3" `svn rev` = "83980" language = "R" version.string = "R version 4.2.3 (2023-03-15)" nickname = "Shortstop Beagle" LC_CTYPE=en_US.UTF-8; LC_NUMERIC=C; LC_TIME=en_US.UTF-8; LC_COLLATE=en_US.UTF-8; LC_MONETARY=en_US.UTF-8; LC_MESSAGES=en_US.UTF-8; LC_PAPER=en_US.UTF-8; LC_NAME=C; LC_ADDRESS=C; LC_TELEPHONE=C; LC_MEASUREMENT=en_US.UTF-8; LC_IDENTIFICATION=C Package = "aws.s3", Type = "Package", Title = "'AWS S3' Client Package", Version = "0.3.22" Package = "aws.signature", Type = "Package", Title = "Amazon Web Services Request Signatures", Version = "0.6.0", Package = "aws.ec2metadata", Type = "Package", Title = "Get EC2 Instance Metadata", Version = "0.2.0"
The text was updated successfully, but these errors were encountered:
Just to double-check, I tried this:
cat(file=stderr(), paste0("Key: ", aws_credentials$key, "\n")) cat(file=stderr(), paste0("Secret: ", aws_credentials$secret, "\n")) cat(file=stderr(), paste0("Token: ", aws_credentials$session_token, "\n")) cat(file=stderr(), paste0("Region: ", aws_credentials$region, "\n")) bucket_access <- aws.s3::bucket_exists( "my_bucket", key=aws_credentials$key, secret=aws_credentials$secret, session_token=aws_credentials$session_token, region=aws_credentials$region)
Output:
Key: *** Secret: *** Token: *** Region: us-west-2 Client error: (403) Forbidden
Does aws.s3 support STS tokens?
aws.s3
Sorry, something went wrong.
I'm facing the same issue. Any workarounds?
Ultimately, I moved to a different library to overcome this limitation.
The workaround would be using an AWS API key, but I would avoid it.
No branches or pull requests
Please specify whether your issue is about:
I'm running my code from rshiny server. The session token is provided using https://docs.aws.amazon.com/eks/latest/userguide/pod-configuration.html.
The
bucket_exists
call fails with the error:Further details
The output of
credentials
shows the correct key id, secret, toke, and region.The attached token is valid: running
awscli
from the same pod I can access the bucket without error.Output of sessionInfo()
The text was updated successfully, but these errors were encountered: