Skip to content

[Question] Use AWS SAM on Github pipeline #4963

Closed

Description

@rsorelli-hedgepoint

Hello folks,

I don't know if it the right place to open this discussion but feel free to correct me if something is wrong.
In the pas days I've been working on the development of a CI/CD pipeline using AWS SAM + Github actions.

To maximize build time instead running a single "aws build" and wait all my lambdas been build sequencely I use github actions with matrix strategy to build every resource in parallel. With this solution I can reach my goal. But after that I need to pack and deploy those lambdas. That's where my nightmare begins.

To make things clear:
#build process
sam build resource-id

As every resource is build on it's own container and as output I have the complied code and the template.yml with the correspondent CodeURI replacement I could find a way to merge all builds back on a single template.

Does anyone has a hint ou sugestion for my case ?

PS.: I do not use aws sam build --parallel because to compile as many lambdas I do have on my stack the container does not have enough memory to hadle that. It takes longer to run than runing without the --parallel flag.

Thanks in advance,

Activity

  1. added
    stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.
    on Apr 3, 2023
  2. qingchm commented on Apr 10, 2023

    @qingchm
    Contributor

    But after that I need to pack and deploy those lambdas

    Thanks for reaching out! May I know what's this process like and what's the main paint point right now?

  3. rsorelli-hedgepoint commented on Apr 18, 2023

    @rsorelli-hedgepoint
    Author

    The main point is how to build a stack using distribuited containers and after build merge then for a deploy.
    Let me try to ilustrate the scenario again:

    • My stack has 2 lambdas A and B
    • On the first container I run "sam build lambdaA"
    • On the second one, I run "sam build lambdaB"

    Each build produces a template.yaml file replacing the "CodeUri" of the lambda pointing to the output artifact of the build

    Is there any way I can merge those outputs (template and artifacts) on a thrid container where I can run the "sam deploy" and have both artifacts deployed ?

  4. locked and limited conversation to collaborators on May 1, 2023
  5. converted this issue into a discussion #5094 on May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions