Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Reuse Infrastructure that Supports CodeBuild (lambdas, iam roles, provider, custom resource) #29

Open
scanlonp opened this issue Sep 14, 2022 · 1 comment

Comments

@scanlonp
Copy link
Contributor

Each time the construct is instantiated, a custom resource, provider, 2 lambdas, and all of their roles are partitioned. Is there a way to reuse some of these resources? This may allow these resources to be pre-created and stored in a separate stack that is then referenced as a dependency.

  • An option to use a pre-existing provider, lambdas, and roles that can be fed into a custom resource unique to each construct
    • would there be an issue granting permissions to run CodeBuild API calls to those pre-existing roles (I do not think so)
  • An option to use any combination of those pre-existing resources
    • for example: pass in the lambdas, but need roles and provider and custom resource created

Thank you @fjinkis for bringing up this request!

@scanlonp
Copy link
Contributor Author

@fjinkis I completely agree that the construct is quite resource heavy. The main justification is that it creates a dependency on the CodeBuild finishing moving the image before allowing any other action by the stack (or other stacks that depend on it) to continue. While it benefits from avoiding race conditions and giving better error messaging, it takes up time and creates a lot of surrounding infrastructure.

I think the most sharing the construct can do would be reusing everything that goes into the custom resource but not the custom resource itself. That is not supported yet, but I think would be an easy improvement.

Another idea (which may justify a new issue) is to add an option to not wait on the CodeBuild and only make a custom resource that starts it. That would be much more light weight and a lot faster, but would not provide the same guardrails.

@scanlonp scanlonp changed the title Reuse Infrastructure that Supports CodeBuild (lambdas, iam roles, provider, custom resource) Feature Request: Reuse Infrastructure that Supports CodeBuild (lambdas, iam roles, provider, custom resource) Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant