-
Notifications
You must be signed in to change notification settings - Fork 82
feat: add "public subnet" mode for lower ongoing costs #283
Conversation
Okay, I finally got the chance to test this out with a real workflow, and I realised that, when we remove the NAT gateway, the WES Adapter lambda gets put into an isolated subnet, and therefore cannot communicate with AWS. Further, you can't put lambdas into a public subnet. However the simple and clean solution was just to take that lambda out of the VPC entirely: it doesn't actually need to be in one, since it's called by the API gateway and all of its actions are performed through the AWS API. Once I made that change (which is now pushed), the workflow ran successfully! I used I've also pulled some upstream changes from the main branch published since I made this PR. |
Hi @markjschreiber is there any chance that this might get reviewed? I am happy to fix the merge conflicts again if a review can be scheduled. |
Sorry for the delay, I have been working on other bug fixes. I will start reviewing today and also ask another engineer to take a look. |
Okay, I think I've fixed all the issues from that code review. Thanks for that. Here are example stacks: |
New updates from the last round of code review. Here are some new example CFN templates. They demonstrate that the VPC only produces public subnets now: |
Please let me know if any more work is needed for this. |
@multimeric one of the build checks is failing seemingly due to a linting failure (changed import order). You can probably fix this by running |
Okay I've pulled from upstream and reformatted the code. |
@multimeric there appears to be a formatting issue again, likely due to my merge from main. If we can resolve that + get it re-reviewed by Mark and I the PR should be ready to merge. |
Okay I've fixed the tests again. This problem keeps happening because changes to upstream break the merge, so the faster this can get approved the better. |
@multimeric done and merged in. |
Issue #, if available: #269
Description of Changes
publicSubnets
option to core stack and batch stackagc account activate --publicSubnets
will create theAgc-Core
stack, but without the endpoints/NATagc-project.yaml
, there is now apublicSubnets
key, which defaults to false. If the core stack was created with--publicSubnets
, this must be set to true or the deployment will failDescription of how you validated changes
aws cloudformation get-template
on stacks generated in both ways--publicSubnets
: public_core.txtaws cloudformation get-template
on stacks generated both wayspublicSubnets: true
in the config file: public_context.txtpublic_core.txt
stack above, whereas the default stack uses private subnets.examples/demo-nextflow-project
after deploying a public account + context stackChecklist
make format
at least. Is that what you want?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license