Paws auth failures when running in a contanerized Lambda
Closed this issue · 1 comments
glennlawyer commented
As of Dec 2020, AWS Lambda now supports deploying AWS Lambda functions as container images. This allows us to run R code in Lambda.
I've build a docker image involving some R code. The R code needs to access a database hosted on AWS, so I've installed the PAWS package. I've given the Lambda the proper IAM permissions to access the DB.
However,
rds <- paws::rds()
token <- rds$build_auth_token(endpoint=paste0(settings$server, ":", settings$port),
user=settings$user)
fails with the message
"Error in system(sprintf(\"echo $%s\", var), intern = T): cannot popen 'echo $AWS_CREDENTIAL_EXPIRATION', probable reason 'Cannot allocate memory'
Is there a workaround?
glennlawyer commented
Issue resolved. I allocated more memory to the Lambda.
In the SAM template:
MemorySize: 1024