dotcom-rendering icon indicating copy to clipboard operation
dotcom-rendering copied to clipboard

Deprecate old node lambdas

Open jamesgorrie opened this issue 3 years ago • 1 comments

AWS often deprecates runtimes for Lambda functions. They do this in two phases: first they prevent new lambdas being created, second they prevent existing lambdas being updated. More information can be found here.

When running the following command it seems we have two lambdas in the frontend account:

aws lambda list-functions --profile frontend --function-version ALL --region eu-west-1 --output text --query "Functions[?Runtime=='nodejs10.x'].FunctionArn" 

frontend-consent-logs-lambda-CODE and frontend-consent-logs-lambda-PROD

These seem to be related to this repo: https://github.com/guardian/consent-logs

From @ashishpuliyel

this dates from when we rolled our own CMP (before we had sourcepoint). "iab": string, <- a valid IAB TCF v1.1 consent string Yes, with TCF v2 we switched to sourcepoint and this shouldn't be bringing back any data anymore. The three sourcesDef in https://github.com/guardian/consent-logs/blob/master/src/model.ts are www (frontend?), DCR and AMP. All three of which now use sourcepoint. This looks entirely redundant/obsolete.

So this looks good to just remove and archive the repo.

AMPValidationLambda

This is running from this repo: https://github.com/guardian/amp-validation-api

As that repo is archived, I am going to assume safe to remove the infrastructure.

jamesgorrie avatar Sep 04 '22 18:09 jamesgorrie

Talk to DevX about tearing down infrastructure from CloudFormation.

jamesgorrie avatar Sep 22 '22 09:09 jamesgorrie

There is traffic going to consent-logs.guardianapis.com and I would want to figure out where this is coming from before destroying the infrastructure.

jamesgorrie avatar Sep 28 '22 09:09 jamesgorrie

done on Monday

VDuczekW avatar Oct 20 '22 09:10 VDuczekW

There was a small amount of traffic going through to consent-logs.guardianapis.com.

This was deemed negligible and was returning errors mostly, so we deleted the stack & fastly services associated.

Thanks @Georges-GNM for helping on this.

jamesgorrie avatar Oct 20 '22 09:10 jamesgorrie