-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from guardian/ld/upgrade-11-after-dynamo-upgrade
Upgrade to Java 11
- Loading branch information
Showing
18 changed files
with
300 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### Testing User Deletion on CODE | ||
|
||
### Testing via the website | ||
* Sign in to the website on [CODE](https://code.dev-theguardian.com/uk) | ||
* Under My Account -> Settings scroll down and hit Delete Account | ||
* Check the cloudwatch output in the [user delete lambda](https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#/functions/mobile-save-for-later-user-deletion-CODE?tab=monitoring) | ||
|
||
### Testing the lambda directly | ||
|
||
* Go to the [user delete lambda](https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#/functions/mobile-save-for-later-user-deletion-CODE?tab=monitoring) | ||
* Run the test tab with this message structure: | ||
```agsl | ||
{ | ||
"Records": [ | ||
{ | ||
"messageId": "19dd0b57-b21e-4ac1-bd88-01bbb068cb78", | ||
"receiptHandle": "MessageReceiptHandle", | ||
"body": "{\"Message\": { \"userId\": \"1\"}}", | ||
"attributes": { | ||
"ApproximateReceiveCount": "1", | ||
"SentTimestamp": "1523232000000", | ||
"SenderId": "123456789012", | ||
"ApproximateFirstReceiveTimestamp": "1523232000001" | ||
}, | ||
"messageAttributes": {}, | ||
"md5OfBody": "{{{md5_of_body}}}", | ||
"eventSource": "aws:sqs", | ||
"eventSourceARN": "arn:aws:sqs:us-east-1:123456789012:MyQueue", | ||
"awsRegion": "us-east-1" | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# This AWS SAM template has been generated from your function's configuration. If | ||
# your function has one or more triggers, note that the AWS resources associated | ||
# with these triggers aren't fully specified in this template and include | ||
# placeholder values. Open this template in AWS Application Composer or your | ||
# favorite IDE and modify it to specify a serverless application with other AWS | ||
# resources. | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: An AWS Serverless Application Model template describing your function. | ||
Resources: | ||
mobilesaveforlateruserdeletionCODE: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: 'target/scala-2.12/mobile-save-for-later-user-deletion.jar' | ||
Description: Lamba that deletes saved for later data for deleted users | ||
MemorySize: 384 | ||
Timeout: 300 | ||
Handler: com.gu.sfl.userdeletion.UserDeletionLambda::handler | ||
Runtime: java11 | ||
Architectures: | ||
- x86_64 | ||
EphemeralStorage: | ||
Size: 512 | ||
Environment: | ||
Variables: | ||
App: mobile-save-for-later-user-deletion | ||
SaveForLaterApp: mobile-save-for-later | ||
Stack: mobile | ||
Stage: CODE | ||
EventInvokeConfig: | ||
MaximumEventAgeInSeconds: 21600 | ||
MaximumRetryAttempts: 2 | ||
PackageType: Zip | ||
Policies: | ||
- Statement: | ||
- Action: | ||
- dynamodb:* | ||
Resource: | ||
- >- | ||
arn:aws:dynamodb:eu-west-1:201359054765:table/mobile-save-for-later-CODE-articles | ||
Effect: Allow | ||
- Action: | ||
- lamda:InvokeFunction | ||
Resource: | ||
- >- | ||
arn:aws:lambda:eu-west-1:201359054765:function:mobile-save-for-later-user-deletion-CODE | ||
Effect: Allow | ||
- Action: | ||
- logs:CreateLogGroup | ||
- logs:CreateLogStream | ||
- logs:PutLogEvents | ||
Resource: '*' | ||
Effect: Allow | ||
- Action: | ||
- sqs:ReceiveMessage | ||
- sqs:DeleteMessage | ||
- sqs:GetQueueAttributes | ||
Resource: | ||
- arn:aws:sqs:eu-west-1:201359054765:UserIdDeleteQueue-CODE | ||
Effect: Allow | ||
SnapStart: | ||
ApplyOn: None | ||
Tags: | ||
App: mobile-save-for-later-user-deletion | ||
Stack: mobile | ||
Stage: CODE | ||
gu:build-tool: guardian/actions-riff-raff | ||
gu:repo: guardian/mobile-save-for-later | ||
Events: | ||
SQS1: | ||
Type: SQS | ||
Properties: | ||
Queue: | ||
Fn::GetAtt: | ||
- SQSQueue1 | ||
- Arn | ||
BatchSize: 5 | ||
RuntimeManagementConfig: | ||
UpdateRuntimeOn: Auto | ||
SQSQueue1: | ||
Type: AWS::SQS::Queue | ||
Properties: | ||
QueueName: SQSQueue1 | ||
SqsManagedSseEnabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
mobile-save-for-later/src/main/scala/com/gu/sfl/lib/SavedArticlesMerger.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.