I am attempting to use the authentication from google, however I have doubts on how I can use in the method:
GoogleCredential credential = GoogleCredential.fromStream(new FileInputStream("MyProject-1234.json"))
.createScoped(Collections.singleton(SQLAdminScopes.SQLSERVICE_ADMIN));
The file MyProject-1234.json is stored on a S3 bucket and this is currently running inside a lambda, how can I use this file on the authentication? I am not sure if I should be sending the path and how, or if I should be doing something else.
Here's how you can pull the file from S3 and use it.
In short, the
getFileFromS3(...)method will return aFileobject that you can use to createFileInputStream.