Skip to content

Instantly share code, notes, and snippets.

View jamylak's full-sized avatar
:octocat:

James Karefylakis jamylak

:octocat:
View GitHub Profile
@jamylak
jamylak / awslambdatogcpfederatedauthextclient.ts
Last active August 30, 2024 03:53
AWS Lambda to Cloud Run Ext Client
// This assumes you created a file with
// gcloud iam workload-identity-pools create-cred-config \
// projects/INSERT_PROJECT_NUMBER/locations/global/workloadIdentityPools/INSERT_POOL_ID/providers/INSERT_PROVIDER_ID \
// --service-account=myserviceaccount@email.com \
// --aws \
// --output-file=testcreds.json
// Then you have gone through the rest of the federated auth setup eg.
// Pool / provider / sa / principalset / etc
// Note this is calling get() for cloud run
@jamylak
jamylak / awslambdatogcpfederatedauth.ts
Last active August 28, 2024 13:38
AWS Lambda to Cloud Run
// This assumes you created a file with
// gcloud iam workload-identity-pools create-cred-config \
// projects/INSERT_PROJECT_NUMBER/locations/global/workloadIdentityPools/INSERT_POOL_ID/providers/INSERT_PROVIDER_ID \
// --service-account=myserviceaccount@email.com \
// --aws \
// --output-file=testcreds.json
// Then you have passed GOOGLE_APPLICATION_CREDENTIALS=testcreds.json
// And you have gone through the rest of the federated auth setup eg.
// Pool / provider / sa / principalset / etc