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

fix(destroy functionality): Fix the issue where destroys fail due to ENIs and SG stuff #48

Merged
merged 23 commits into from
Jun 29, 2023

Conversation

mdial89f
Copy link
Contributor

Purpose

This changeset fixes the issue with our stage destroy workflow, where 'seatool' would fail to destroy.

Linked Issues to Close

Closes https://qmacbis.atlassian.net/browse/OY2-24530

Approach

This problem is kind of out of our control. Amazon creates ENIs for our VPC based lambdas, and it attaches the security group we specify to it.
These ENIs live beyond the life of the lambda function, for an indeterminate time.... minutes, hours, days.
The issue is that CF tries to delete the security group without waiting for the ENI to be 'available', causing a failure. And even if we tried to wait for it to be available, it may be unacceptable long (hours, days).

All to say, this is a problem, and well documented in online forums.

Here's how this takes it on:

  • the security group(s) for VPC based lambdas (we only have one in this project) has its DeletionPolicy set to Retain. This immediately resolves the destroy failures, because the security group delete will not be attempted.
  • a new problem surfaces, whereby we're leaving unattached security groups hanging around, although they won't be unattached until the ENIs delete themselves at some point in the future. To handle this, a workflow is added, to compare all security groups for our project against a list of security groups attached to ENIs. Any found are deleted. This keeps us from getting security hub findings.

Assorted Notes/Considerations/Learning

None

@benjaminpaige benjaminpaige changed the base branch from master to mako June 29, 2023 14:41
@mdial89f mdial89f merged commit fa5f73e into mako Jun 29, 2023
@mdial89f mdial89f deleted the dfix branch June 29, 2023 14:43
mdial89f added a commit that referenced this pull request Jul 5, 2023
…able (#50)

* add cognito

* rm

* correct some stuff

* broken

* updates

* tee up amplify and configure it

* tweak the ui start thing

* yuttttttt

* Functional login and out

* 'fix' the data loader.... might want pk/sk instead

* lets put some data in the base

* enable iam for endpoints

* CRUD CRUD CRUD

* real crud, real real

* cleanup

* linting

* cleanup

* last one

* last last one

* accomodate cfn-nag

* Until we have actual reference data, shutting this off.  The structure of data we're posting breaks the api

* cfn-nag fixes

* checking in from today

* trim horizon

* batch size to the max, 10k

* ok back to 1

* go back to latest

* update role handling

* trim horizon and batch

* latest, 1

* update seatool-sink funciton

* get user attributes

* Fix to override the redirect login/out urls to localhost, when starting react locally

* Fix dep vulnerabilities

* Ignore low findings in dep review

* Move playwright intsallation to the run command.. not sure if we want this

* add tombstone deletes

* on demand billing for our seatool table

* batch of 1000, timeout of a min

* hack

* put back

* TRIM HORIZON

* move to a batch of 100, 2048 memory, and remove the await at the loop level

* asdf

* 10s timeout 1024 memory

* view the data

* Seatool indexes and api authorization pattern (#46)

* update dynamo gsis and add lambda authenticator - wip

* add api auth - wip

* update types

* remove authorizer

* refactor

* refactor more

* refactor more more

* update types

* core

* fix(disable user sign up):  remove cognito sign up option - the test users remain (#47)

* disable sign up

* remove default from src

* fix

* fix(destroy functionality):  Fix the issue where destroys fail due to ENIs and SG stuff (#48)

* Retain the seatool lambda sg

* workflow to cleanup

* Asdf

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* fix triggers

* feat(dns and certs):  Add/fix capability to conditionally load a domain and associated cert (#49)

* Clean up cert support

* Fixes

* getting consumer group ids

* toggle complete

* wait for groups to be inactive

* works but super slow

* bleh

* functional

* correct

* asdf

* asdf

* cleanup

---------

Co-authored-by: Benjamin Paige <[email protected]>
Co-authored-by: 13bfrancis <[email protected]>
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants