-2

So, I have this legacy project I am starting to hump into with my team. This is a AWS Lambda Python application (a bunch of Micro-services that inform various front-ends). So, when I asked how they integrated this with Github I immediately panicked: the answer was they don't.

I've been reading around and found several sources on how to do this (from a simple script inside Github to using Third-party platforms that do the job for you). So my question is now how, but more..

If this is not the way that real AWS Lambda developers work, how do they, then? I want git integration because our needs are:

  • Developer to create PRs when they have new code (so everybody can review it)
  • A way of handling the code and being able to roll back regressions.
  • A clean way of storing the code different code versions

Is there something I am not seeing?

7
  • What does "integrate" mean to you? You want to use source control for your Lambda functions?
    – user253751
    Jan 19, 2021 at 19:44
  • Exactly @user253751 I state what I mean/expect for the integration in the next line: source control de lambdas, of course + PRs, rollbacks, etc. Jan 21, 2021 at 22:31
  • 1
    I would phrase it as "How can I use source control with my Lambda functions?" or similar, rather than "how can I integrate with GitHub?"
    – user253751
    Jan 21, 2021 at 22:49
  • 1
    Is it a good idea to store code in a repository? Yes. At my organization we have hundreds of lambda functions and they are all in GitHub. You seem to be in an organization with folks who either don't understand the benefits or don't care, perhaps because it's a legacy project. If you feel that the code should be in GitHub, then make your case for it and try to convince your coworkers of the benefits.
    – Dan Wilson
    Jan 26, 2021 at 15:37
  • 1
    Since you found several sources showing how Lambdas can be stored in version control, what makes you think that it is not common to do so? What is a "real AWS Lambda developer", and how have you determined that your colleagues are closer to that category than the people whose deployment scripts you found?
    – IMSoP
    Jan 26, 2021 at 17:19

1 Answer 1

4

As a rule you always want to have version control for your deployed code - typically this means a source code repository separate from your application.

In the case of AWS Lambda, there is a built in capability to version your functions, from the AWS Lambda developer guide:

A function version includes the following information:

  • The function code and all associated dependencies.
  • The Lambda runtime that invokes the function.
  • All of the function settings, including the environment variables.
  • A unique Amazon Resource Name (ARN) to identify the specific version of the function.

This can be combined with the alias capability so that in theory you can safely work on lambda code "in place" - at least if using languages (like python) that you can edit directly in the web console.

There is enough logging/auditing available in AWS that this should be workable in a production system.

This is not something I've ever considered or tried so I can't comment on how practical it is, but its certainly a valid approach to the problem.


There is no single definition of "real" developer we are a diverse bunch and what is "right" very much depends on context

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.