Running GAM in AWS Lambda function

481 views
Skip to first unread message

Marco Berger

unread,
Nov 24, 2016, 7:41:57 AM11/24/16
to GAM for G Suite
Hi everyone,

has anybody ever tried to run GAM in an AWS Lambda function and can share some experiences? I am currently trying to include GAM in a Lambda deployment.

Two specific issues arise:

1) GAM seems to need env variables(like 'TERM') to be set, which is not given in AWS Lamba. Can I somehow get to know which env variables are needed or/and if they can be substituted somehow?

2) Is there a way to go through the oAuth process in a silent way - so that I don't need any browser and user interaction?

Thanks,
Marco

Rob Barnes

unread,
Sep 11, 2017, 7:25:44 PM9/11/17
to GAM for G Suite
I was just thinking today how this would be really cool to do.  I'm not sure how it would be done, but if you ever figure it out, I would love to know as well!

+KimNilsson

unread,
Sep 12, 2017, 5:03:27 AM9/12/17
to GAM for G Suite
Do the oauth process elsewhere, and include the ouath2.txt file with your json fiiles.

Tiago Jobling

unread,
Jan 9, 2023, 4:31:47 PM1/9/23
to GAM for Google Workspace
Did anyone ever get this to work?

Thanks in advance!

Rance Hall

unread,
Jan 9, 2023, 4:43:56 PM1/9/23
to google-ap...@googlegroups.com

I usually set this in gam.cfg

 

no_browser = true

 

Then you can do the web-based flows on another machine with guidance provided by gam along the way.

 

R

 

From: 'Tiago Jobling' via GAM for Google Workspace <google-ap...@googlegroups.com>
Date: Monday, January 9, 2023 at 3:31 PM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: [GAM] Re: Running GAM in AWS Lambda function

[EXTERNAL EMAIL]


The content of this email is confidential and intended for the recipient specified in message only. It is strictly prohibited to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/042e35cf-b0f9-4bc6-a11c-ed896b73b591n%40googlegroups.com.

Tiago Jobling Santos

unread,
Jan 9, 2023, 4:45:30 PM1/9/23
to google-ap...@googlegroups.com
Bue which files do you need to include in the AWS Lambda function? How do you mimic oauth2.txt (and remaining files) usage in an ephemeral environment?

Tiago Jobling Santos

Senior Systems Administrator

tiago....@feedzai.com | PGP

 

+351 911 739 691 

 

Feedzai Follow Feedzai on Facebook. Follow Feedzai on Twitter! Connect with Feedzai on LinkedIn! Subscribe to Feedzai on Youtube!




You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/hW1z05jWln0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/DM8PR06MB7717EF36DAB239CB215CE7AC90FE9%40DM8PR06MB7717.namprd06.prod.outlook.com.

Rance Hall

unread,
Jan 9, 2023, 5:06:15 PM1/9/23
to google-ap...@googlegroups.com

To my knowledge you don’t exactly.

 

Gam is designed to be installed on a google cloud console or similar machine that may not be “up” all the time but that the “state” is the same as when you left it.

 

If that isn’t true for you, then you are gonna have a difficult time.

 

I can’t address your Lambda question directly as I am not AWS user and haven’t tried to do this.

 

But I can say that GAM does write timestamps to its config file and its whole ~/.gam config directory is a requirement for usage including the python scripts themselves.

 

In a docker container I would volume mount the ~/.gam folder in its entirety.

 

Hope this helps.

 

Rance

Reply all
Reply to author
Forward
0 new messages