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

remove soft-opt-ins-logging* tables from cf #1339

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 0 additions & 81 deletions cloudformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ Resources:
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${App}-${Stage}-subscription-events-v2
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${App}-${Stage}-subscriptions
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${App}-${Stage}-user-subscriptions
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${App}-${Stage}-soft-opt-ins-logging-v2

- PolicyName: Sqs
PolicyDocument:
Expand Down Expand Up @@ -1062,12 +1061,6 @@ Resources:
Action:
- ssm:GetParametersByPath
Resource: !Sub arn:aws:ssm:${AWS::Region}:${AWS::AccountId}:parameter/${App}/${Stage}/${Stack}/*
- Statement:
- Effect: Allow
Action:
- "dynamodb:PutItem"
Resource:
- !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${App}-${Stage}-soft-opt-ins-logging-v2

AppleRevalidateReceiptsLambda:
Type: AWS::Serverless::Function
Expand Down Expand Up @@ -1261,80 +1254,6 @@ Resources:
- sqs:ReceiveMessage
Resource: "*"

# Deprecated, cloudformation does not allow removing DynamoDB tables.
SoftOptInsLoggingTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: !Sub ${App}-${Stage}-soft-opt-ins-logging
AttributeDefinitions:
- AttributeName: timestamp
AttributeType: S
- AttributeName: userId
AttributeType: S
- AttributeName: subscriptionId
AttributeType: S
KeySchema:
- AttributeName: timestamp
KeyType: RANGE
- AttributeName: userId
KeyType: HASH
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
BillingMode: PAY_PER_REQUEST
SSESpecification:
SSEEnabled: true
GlobalSecondaryIndexes:
- IndexName: subscriptionId-index
KeySchema:
- AttributeName: subscriptionId
KeyType: HASH
Projection:
ProjectionType: ALL
Tags:
- Key: Stage
Value: !Ref Stage
- Key: Stack
Value: !Ref Stack
- Key: App
Value: !Ref App

# Deprecated, cloudformation does not allow removing DynamoDB tables.
SoftOptInsLoggingTable2:
Type: AWS::DynamoDB::Table
Properties:
TableName: !Sub ${App}-${Stage}-soft-opt-ins-logging-v2
AttributeDefinitions:
- AttributeName: timestamp
AttributeType: N
- AttributeName: userId
AttributeType: S
- AttributeName: subscriptionId
AttributeType: S
KeySchema:
- AttributeName: userId
KeyType: HASH
- AttributeName: timestamp
KeyType: RANGE
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
BillingMode: PAY_PER_REQUEST
SSESpecification:
SSEEnabled: true
GlobalSecondaryIndexes:
- IndexName: subscriptionId-index
KeySchema:
- AttributeName: subscriptionId
KeyType: HASH
Projection:
ProjectionType: ALL
Tags:
- Key: Stage
Value: !Ref Stage
- Key: Stack
Value: !Ref Stack
- Key: App
Value: !Ref App

failedSettingCancellationSoftOptIns:
Condition: IsProd
Type: AWS::CloudWatch::Alarm
Expand Down
Loading