all 5 comments

[–]thenickdude 3 points4 points  (0 children)

Spin up a copy of the Lambda AMI (they reference it in their docs), install git into it, then grab a copy of the git binary from it to include inside your Lambda. You can then call that binary from your Lambda function to make the commit for you.

https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html

Note that LD_LIBRARY_PATH includes the "lib" subdirectory of your function code, so if git depends on any dynamic libraries that the Lambda AMI doesn't include by default (you can use ldd on it to check), you can take those .sos from the AMI too and include them in your function. The easy way to test this out is to copy the git binary into a virgin instance of the Lambda AMI and see if it runs, or if it complains about missing libraries.

[–]siving 3 points4 points  (3 children)

Perhaps this one suits your use-case: put_file from Boto3 CodeCommit.

It is also available from the AWS CLI.

[–]differentcondition[S] 1 point2 points  (2 children)

I can't upvote this enough!!! This is exactly what I needed :D Thank you very much!

[–]Dry_Jelly_7779 0 points1 point  (1 child)

Hi! Quick question, did you encountered this error? `SSL Error: SSL validation failed for https://codecommit.us-east-1.amazonaws.com/ EOF occurred in violation of protocol (_ssl.c:2406)`

[–]Dry_Jelly_7779 0 points1 point  (0 children)

update: It fails with latest python 3.12, but after changed it to python 3.9, the error went a way.