Issue setting region
scrapeable opened this issue · 3 comments
For some reason I keep getting the error No region provided.
From my .Renviron I tried a number of different variations of region. I use the paws package quite a bit and have had no issue in the past using us-east-2. Tried a few other regions too but no luck. I'm using the latest development version from github.
example of how I connect to qs
qs <- quicksight(
config = list(
credentials = list(
creds = list(
access_key_id = aws_key,
secret_access_key = aws_secrect_key
)
),
region = 'us-east-2'
)
)
region examples
REGION=us-east-2
REGION=east-2
session
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] r2lambda_0.1.0
loaded via a namespace (and not attached):
[1] backports_1.4.1 R6_2.5.1 paws.compute_0.4.0 paws.common_0.6.2 magrittr_2.0.3 glue_1.6.2
[7] paws_0.4.0 logger_0.2.2 cli_3.6.1 compiler_4.3.0 httr_1.4.6 rstudioapi_0.15.0
[13] tools_4.3.0 checkmate_2.2.0 curl_5.0.1 Rcpp_1.0.11 rlang_1.1.1 crayon_1.5.2
r code + error
> library(r2lambda)
>
> runtime_function <- "parity"
> runtime_path <- system.file("parity.R", package = "r2lambda")
> dependencies <- NULL
>
> # Might take a while, its building a docker image
> build_lambda(
+ tag = "parity6",
+ runtime_function = runtime_function,
+ runtime_path = runtime_path,
+ dependencies = dependencies
+ )
INFO [2023-10-25 23:11:21] [build_lambda] Checking system dependencies.
INFO [2023-10-25 23:11:21] [build_lambda] Creating temporary working directory.
INFO [2023-10-25 23:11:21] [build_lambda] Creating Dockerfile.
WARN [2023-10-25 23:11:21] [build_lambda] Created Dockerfile and lambda runtime script in temporary folder.
INFO [2023-10-25 23:11:21] [build_lambda] Building Docker image.
ERROR [2023-10-25 23:11:21] Failed to create Lambda Docker image.
Error in `value[[3L]]()`:
! No region provided
Run `rlang::last_trace()` to see where the error occurred.
Hi @scrapeable,
Thanks for spotting this. Can you please try with the following .Renviron
setup:
AWS_ACCESS_KEY_ID = ....
AWS_SECRET_ACCESS_KEY = ....
AWS_REGION = ....
AWS_PROFILE = ....
Note the AWS_
prefix. For details on how paws
(used internally by r2lambda
) connects to AWS see here: https://github.com/paws-r/paws/blob/main/docs/credentials.md
I'll update the README to reflect this.
All the best!
Hi @scrapeable did this solve the problem? If yes, let me know so we can close this issue. Thanks!
@teofiln sorry for the delay, yes it did. I believe it actually was first a docker issue on my end. I reinstalled docker and made the above changes and it worked.