From 0ca9c9b66e42ab39a886acb9caf86b1258265b62 Mon Sep 17 00:00:00 2001 From: KallynGowdy Date: Mon, 19 Jun 2023 11:44:49 -0400 Subject: [PATCH 1/3] refactor: Remove DynamoDB from the backend template --- docker/docker-compose.dev.yml | 9 - src/aux-auth/scripts/auth-configs.js | 3 - src/aux-auth/scripts/bootstrap.js | 169 --------- .../serverless/aws/src/handlers/Records.ts | 144 +------- src/aux-auth/serverless/aws/template.yml | 343 +----------------- 5 files changed, 2 insertions(+), 666 deletions(-) diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index d07e8e613f..f4ed003e01 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -16,15 +16,6 @@ services: restart: always ports: - '6379:6379' - dynamodb: - command: '-jar DynamoDBLocal.jar -sharedDb -dbPath ./data' - image: 'amazon/dynamodb-local:latest' - restart: always - ports: - - '9125:8000' - volumes: - - './services/data/dynamodb:/home/dynamodblocal/data' - working_dir: /home/dynamodblocal s3: image: localstack/localstack:latest environment: diff --git a/src/aux-auth/scripts/auth-configs.js b/src/aux-auth/scripts/auth-configs.js index b7e3d62357..aa41f572c4 100644 --- a/src/aux-auth/scripts/auth-configs.js +++ b/src/aux-auth/scripts/auth-configs.js @@ -70,9 +70,6 @@ function createConfigs(dev, version) { define: { ...versionVariables, ...developmentVariables, - DYNAMODB_ENDPOINT: dev - ? JSON.stringify('http://dynamodb:8000') - : JSON.stringify(undefined), S3_ENDPOINT: dev ? JSON.stringify('http://s3:4566') : JSON.stringify(undefined), diff --git a/src/aux-auth/scripts/bootstrap.js b/src/aux-auth/scripts/bootstrap.js index 7e1704be53..1787362f8f 100644 --- a/src/aux-auth/scripts/bootstrap.js +++ b/src/aux-auth/scripts/bootstrap.js @@ -12,11 +12,6 @@ AWS.config.update({ secretAccessKey: 'xxxx', }); -const ddb = new AWS.DynamoDB({ - endpoint: 'http://localhost:9125', - apiVersion: '2012-08-10', -}); - const s3 = new AWS.S3({ endpoint: 'http://localhost:4566', apiVersion: '2006-03-01', @@ -24,23 +19,9 @@ const s3 = new AWS.S3({ }); // See env.json -const USERS_TABLE = 'Users'; -const USER_ADDRESSES_TABLE = 'UserAddresses'; -const LOGIN_REQUESTS_TABLE = 'LoginRequests'; -const SESSIONS_TABLE = 'Sessions'; -const RECORDS_TABLE = 'Records'; -const EMAIL_TABLE = 'EmailRules'; -const SMS_TABLE = 'SmsRules'; -const PUBLIC_RECORDS_TABLE = 'PublicRecords'; -const PUBLIC_RECORDS_KEYS_TABLE = 'PublicRecordsKeys'; -const DATA_TABLE = 'Data'; -const MANUAL_DATA_TABLE = 'ManualData'; -const FILES_TABLE = 'Files'; const FILES_BUCKET = 'files-bucket'; -const EVENTS_TABLE = 'Events'; async function start() { - const tablesResult = await ddb.listTables({}).promise(); const reset = process.argv.includes('--reset'); const templateSrc = readFileSync( @@ -49,133 +30,7 @@ async function start() { ); const template = YAML.parseDocument(templateSrc).toJSON(); - await createOrUpdateTable( - tablesResult, - USERS_TABLE, - reset, - template.Resources.UsersTable.Properties - ); - await createOrUpdateTable( - tablesResult, - USER_ADDRESSES_TABLE, - reset, - template.Resources.UserAddressesTable.Properties - ); - await createOrUpdateTable( - tablesResult, - RECORDS_TABLE, - reset, - template.Resources.RecordsTable.Properties - ); - await createOrUpdateTable( - tablesResult, - EMAIL_TABLE, - reset, - template.Resources.EmailRulesTable.Properties - ); - - await ddb - .putItem({ - TableName: EMAIL_TABLE, - Item: { - id: { S: 'deny_test' }, - type: { S: 'deny' }, - pattern: { S: '^test@casualsimulation\\.org$' }, - }, - }) - .promise(); - - await ddb - .putItem({ - TableName: EMAIL_TABLE, - Item: { - id: { S: 'allow_casualsim' }, - type: { S: 'allow' }, - pattern: { S: '@casualsimulation\\.org$' }, - }, - }) - .promise(); - - await createOrUpdateTable( - tablesResult, - SMS_TABLE, - reset, - template.Resources.SmsRulesTable.Properties - ); - - await ddb - .putItem({ - TableName: SMS_TABLE, - Item: { - id: { S: 'deny_test' }, - type: { S: 'deny' }, - pattern: { S: '^\\+1999' }, - }, - }) - .promise(); - - await ddb - .putItem({ - TableName: SMS_TABLE, - Item: { - id: { S: 'allow_usa' }, - type: { S: 'allow' }, - pattern: { S: '^\\+1' }, - }, - }) - .promise(); - - await createOrUpdateTable( - tablesResult, - PUBLIC_RECORDS_TABLE, - reset, - template.Resources.PublicRecordsTable.Properties - ); - await createOrUpdateTable( - tablesResult, - PUBLIC_RECORDS_KEYS_TABLE, - reset, - template.Resources.PublicRecordsKeysTable.Properties - ); - await createOrUpdateTable( - tablesResult, - DATA_TABLE, - reset, - template.Resources.DataTable.Properties - ); - await createOrUpdateTable( - tablesResult, - MANUAL_DATA_TABLE, - reset, - template.Resources.ManualDataTable.Properties - ); - await createOrUpdateTable( - tablesResult, - FILES_TABLE, - reset, - template.Resources.FilesTable.Properties - ); - await createS3Buckets(reset); - - await createOrUpdateTable( - tablesResult, - EVENTS_TABLE, - reset, - template.Resources.EventsTable.Properties - ); - await createOrUpdateTable( - tablesResult, - LOGIN_REQUESTS_TABLE, - reset, - template.Resources.LoginRequestsTable.Properties - ); - await createOrUpdateTable( - tablesResult, - SESSIONS_TABLE, - reset, - template.Resources.SessionsTable.Properties - ); } start().then( @@ -252,27 +107,3 @@ async function deleteBucket(bucketName) { }) .promise(); } - -async function createOrUpdateTable(tables, tableName, reset, params) { - const hasTable = tables.TableNames.includes(tableName); - if (!hasTable || reset) { - if (hasTable) { - console.log(`Deleting ${tableName} Table`); - await ddb - .deleteTable({ - TableName: tableName, - }) - .promise(); - } - - console.log(`Creating ${tableName} Table`); - await ddb - .createTable({ - TableName: tableName, - ...params, - }) - .promise(); - } else { - console.log(`${tableName} Table already exists`); - } -} diff --git a/src/aux-auth/serverless/aws/src/handlers/Records.ts b/src/aux-auth/serverless/aws/src/handlers/Records.ts index 54e1bc8d93..7190c90228 100644 --- a/src/aux-auth/serverless/aws/src/handlers/Records.ts +++ b/src/aux-auth/serverless/aws/src/handlers/Records.ts @@ -1,54 +1,15 @@ // Create clients and set shared const values outside of the handler. +import { getAllowedAPIOrigins, allowedOrigins } from '../utils'; import { - formatResponse, - validateOrigin, - findHeader, - getSessionKey, - getAllowedAPIOrigins, - allowedOrigins, - validateSessionKey, -} from '../utils'; -import { - RecordsController, - DataRecordsController, - FileRecordsController, - EventRecordsController, - RecordsHttpServer, GenericHttpRequest, GenericHttpHeaders, - StripeInterface, - SubscriptionController, - tryParseSubscriptionConfig, - RateLimitController, - PolicyController, - tryParseJson, } from '@casual-simulation/aux-records'; -import { AuthController } from '@casual-simulation/aux-records/AuthController'; -import { ConsoleAuthMessenger } from '@casual-simulation/aux-records/ConsoleAuthMessenger'; -import { - DynamoDBRecordsStore, - DynamoDBDataStore, - DynamoDBFileStore, - DynamoDBEventStore, - cleanupObject, - DynamoDBAuthStore, - TextItAuthMessenger, - DynamoDBPolicyStore, -} from '@casual-simulation/aux-records-aws'; import type { APIGatewayProxyEvent, APIGatewayProxyResult, EventBridgeEvent, S3Event, } from 'aws-lambda'; -import AWS from 'aws-sdk'; -import { LivekitController } from '@casual-simulation/aux-records/LivekitController'; -import { parseSessionKey } from '@casual-simulation/aux-records/AuthUtils'; -import { StripeIntegration } from '../../../../shared/StripeIntegration'; -import Stripe from 'stripe'; -import { AuthMessenger } from '@casual-simulation/aux-records/AuthMessenger'; -import RedisRateLimitStore from '@casual-simulation/rate-limit-redis'; -import { createClient as createRedisClient } from 'redis'; import { BuilderOptions, ServerBuilder, @@ -57,55 +18,15 @@ import { loadConfig } from '../../../../shared/ConfigUtils'; import { merge } from 'lodash'; declare var S3_ENDPOINT: string; -declare var DYNAMODB_ENDPOINT: string; declare var DEVELOPMENT: boolean; // Get the DynamoDB table name from environment variables -const PUBLIC_RECORDS_TABLE = process.env.PUBLIC_RECORDS_TABLE; -const PUBLIC_RECORDS_KEYS_TABLE = process.env.PUBLIC_RECORDS_KEYS_TABLE; -const DATA_TABLE = process.env.DATA_TABLE; -const MANUAL_DATA_TABLE = process.env.MANUAL_DATA_TABLE; const FILES_BUCKET = process.env.FILES_BUCKET; const FILES_STORAGE_CLASS = process.env.FILES_STORAGE_CLASS; -const FILES_TABLE = process.env.FILES_TABLE; -const EVENTS_TABLE = process.env.EVENTS_TABLE; const REGION = process.env.AWS_REGION; -const USERS_TABLE = process.env.USERS_TABLE; -const USER_ADDRESSES_TABLE = process.env.USER_ADDRESSES_TABLE; -const LOGIN_REQUESTS_TABLE = process.env.LOGIN_REQUESTS_TABLE; -const SESSIONS_TABLE = process.env.SESSIONS_TABLE; -const EMAIL_TABLE = process.env.EMAIL_TABLE; -const SMS_TABLE = process.env.SMS_TABLE; -const POLICIES_TABLE = process.env.POLICIES_TABLE; -const ROLES_TABLE = process.env.ROLES_TABLE; -const SUBJECT_ROLES_TABLE = process.env.SUBJECT_ROLES_TABLE; -const ROLE_SUBJECTS_TABLE = process.env.ROLE_SUBJECTS_TABLE; -const STRIPE_CUSTOMER_ID_INDEX_NAME = 'StripeCustomerIdsIndex'; - -// const RATE_LIMIT_PREFIX = `${REDIS_NAMESPACE}:rate-limit/`; const staticConfig = loadConfig(); const dynamicConfig: BuilderOptions = { - dynamodb: { - usersTable: USERS_TABLE, - userAddressesTable: USER_ADDRESSES_TABLE, - loginRequestsTable: LOGIN_REQUESTS_TABLE, - sessionsTable: SESSIONS_TABLE, - emailTable: EMAIL_TABLE, - smsTable: SMS_TABLE, - policiesTable: POLICIES_TABLE, - rolesTable: ROLES_TABLE, - subjectRolesTable: SUBJECT_ROLES_TABLE, - roleSubjectsTable: ROLE_SUBJECTS_TABLE, - stripeCustomerIdsIndexName: STRIPE_CUSTOMER_ID_INDEX_NAME, - dataTable: DATA_TABLE, - manualDataTable: MANUAL_DATA_TABLE, - filesTable: FILES_TABLE, - eventsTable: EVENTS_TABLE, - publicRecordsTable: PUBLIC_RECORDS_TABLE, - publicRecordsKeysTable: PUBLIC_RECORDS_KEYS_TABLE, - endpoint: DYNAMODB_ENDPOINT, - }, s3: { region: REGION, filesBucket: FILES_BUCKET, @@ -125,69 +46,6 @@ const dynamicConfig: BuilderOptions = { const config = merge({}, staticConfig, dynamicConfig); -// const config: BuilderOptions = { -// dynamodb: { -// usersTable: USERS_TABLE, -// userAddressesTable: USER_ADDRESSES_TABLE, -// loginRequestsTable: LOGIN_REQUESTS_TABLE, -// sessionsTable: SESSIONS_TABLE, -// emailTable: EMAIL_TABLE, -// smsTable: SMS_TABLE, -// policiesTable: POLICIES_TABLE, -// rolesTable: ROLES_TABLE, -// subjectRolesTable: SUBJECT_ROLES_TABLE, -// roleSubjectsTable: ROLE_SUBJECTS_TABLE, -// stripeCustomerIdsIndexName: STRIPE_CUSTOMER_ID_INDEX_NAME, -// dataTable: DATA_TABLE, -// manualDataTable: MANUAL_DATA_TABLE, -// filesTable: FILES_TABLE, -// eventsTable: EVENTS_TABLE, -// publicRecordsTable: PUBLIC_RECORDS_TABLE, -// publicRecordsKeysTable: PUBLIC_RECORDS_KEYS_TABLE, -// endpoint: DYNAMODB_ENDPOINT, -// }, -// s3: { -// region: REGION, -// filesBucket: FILES_BUCKET, -// filesStorageClass: FILES_STORAGE_CLASS, - -// // We reference the Vite server in development. -// // since any preflight request with an Origin header is rejected by localstack (see https://github.com/localstack/localstack/issues/4056) -// // This parameter is mostly only used so that the file URLs point to the correct S3 instance. As such, -// // this value is mostly used by browsers trying to upload files. -// host: DEVELOPMENT ? `http://localhost:3002/s3` : undefined, -// options: { -// endpoint: S3_ENDPOINT, -// s3ForcePathStyle: DEVELOPMENT, -// }, -// }, -// livekit: { -// apiKey: LIVEKIT_API_KEY, -// secretKey: LIVEKIT_SECRET_KEY, -// endpoint: LIVEKIT_ENDPOINT, -// }, -// rateLimit: { -// windowMs: RATE_LIMIT_WINDOW_MS, -// maxHits: RATE_LIMIT_MAX, -// }, -// redis: { -// host: REDIS_HOST, -// port: REDIS_PORT, -// password: REDIS_PASS, -// tls: REDIS_TLS, -// rateLimitPrefix: RATE_LIMIT_PREFIX, -// }, -// textIt: { -// apiKey: API_KEY, -// flowId: FLOW_ID, -// }, -// stripe: { -// secretKey: STRIPE_SECRET_KEY, -// publishableKey: STRIPE_PUBLISHABLE_KEY, -// }, -// subscriptions: subscriptions.success ? subscriptions.value : undefined, -// }; - const allowedApiOrigins = new Set([ 'http://localhost:3000', 'http://localhost:3002', diff --git a/src/aux-auth/serverless/aws/template.yml b/src/aux-auth/serverless/aws/template.yml index 65ded8ef05..f6ffd78036 100644 --- a/src/aux-auth/serverless/aws/template.yml +++ b/src/aux-auth/serverless/aws/template.yml @@ -53,69 +53,17 @@ Resources: Timeout: 100 Description: A function that publishes and retreives records for the user. Policies: - # Give Create/Read/Update/Delete Permissions to the SampleTable - - DynamoDBCrudPolicy: - TableName: !Ref PublicRecordsTable - - DynamoDBCrudPolicy: - TableName: !Ref PublicRecordsKeysTable - - DynamoDBCrudPolicy: - TableName: !Ref DataTable - - DynamoDBCrudPolicy: - TableName: !Ref ManualDataTable - - DynamoDBCrudPolicy: - TableName: !Ref FilesTable - - DynamoDBCrudPolicy: - TableName: !Ref EventsTable - - DynamoDBCrudPolicy: - TableName: !Ref UsersTable - - DynamoDBCrudPolicy: - TableName: !Ref UserAddressesTable - - DynamoDBCrudPolicy: - TableName: !Ref LoginRequestsTable - - DynamoDBCrudPolicy: - TableName: !Ref SessionsTable - # Give Create/Read/Update/Delete Permissions to the EmailRulesTable & SmsRulesTable - - DynamoDBCrudPolicy: - TableName: !Ref EmailRulesTable - - DynamoDBCrudPolicy: - TableName: !Ref SmsRulesTable - - DynamoDBCrudPolicy: - TableName: !Ref PoliciesTable - - DynamoDBCrudPolicy: - TableName: !Ref RolesTable - - DynamoDBCrudPolicy: - TableName: !Ref SubjectRolesTable - - DynamoDBCrudPolicy: - TableName: !Ref RoleSubjectsTable + # Give Create/Read/Update/Delete Permissions to the Bucket - S3CrudPolicy: BucketName: !Sub '${AWS::StackName}-filesbucket-${AWS::AccountId}' Environment: Variables: SERVER_CONFIG: !Ref ServerConfigParameter - - # Make table name accessible as environment variable from function code during execution - MANUAL_DATA_TABLE: !Ref ManualDataTable - EVENTS_TABLE: !Ref EventsTable REGION: !Ref 'AWS::Region' FILES_BUCKET: !Sub '${AWS::StackName}-filesbucket-${AWS::AccountId}' FILES_STORAGE_CLASS: !Ref FileRecordsS3StorageClassParameter ALLOWED_ORIGINS: !Ref AllowedOriginsParameter ALLOWED_API_ORIGINS: !Ref AllowedApiOriginsParameter - - PUBLIC_RECORDS_TABLE: !Ref PublicRecordsTable - PUBLIC_RECORDS_KEYS_TABLE: !Ref PublicRecordsKeysTable - DATA_TABLE: !Ref DataTable - FILES_TABLE: !Ref FilesTable - USERS_TABLE: !Ref UsersTable - USER_ADDRESSES_TABLE: !Ref UserAddressesTable - LOGIN_REQUESTS_TABLE: !Ref LoginRequestsTable - SESSIONS_TABLE: !Ref SessionsTable - POLICIES_TABLE: !Ref PoliciesTable - ROLES_TABLE: !Ref RolesTable - SUBJECT_ROLES_TABLE: !Ref SubjectRolesTable - ROLE_SUBJECTS_TABLE: !Ref RoleSubjectsTable - EMAIL_TABLE: !Ref EmailRulesTable - SMS_TABLE: !Ref SmsRulesTable Events: CreateRecordKey: Type: Api @@ -316,197 +264,6 @@ Resources: # Simple syntax to create a DynamoDB table with a single attribute primary key, more in # https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesssimpletable - # DynamoDB table to store users: {id: <ID>, name: <NAME>} - UsersTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: id - KeyType: HASH - AttributeDefinitions: - - AttributeName: id - AttributeType: S - - AttributeName: stripeCustomerId - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - GlobalSecondaryIndexes: - - IndexName: StripeCustomerIdsIndex - KeySchema: - - KeyType: HASH - AttributeName: stripeCustomerId - Projection: - ProjectionType: KEYS_ONLY - ProvisionedThroughput: - ReadCapacityUnits: 1 - WriteCapacityUnits: 1 - - UserAddressesTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: address - KeyType: HASH - - AttributeName: addressType - KeyType: RANGE - AttributeDefinitions: - - AttributeName: address - AttributeType: S - - AttributeName: addressType - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - LoginRequestsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: userId - KeyType: HASH - - AttributeName: requestId - KeyType: RANGE - AttributeDefinitions: - - AttributeName: userId - AttributeType: S - - AttributeName: requestId - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - SessionsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: userId - KeyType: HASH - - AttributeName: sessionId - KeyType: RANGE - AttributeDefinitions: - - AttributeName: userId - AttributeType: S - - AttributeName: sessionId - AttributeType: S - - AttributeName: expireTimeMs - AttributeType: 'N' - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - LocalSecondaryIndexes: - - IndexName: ExpireTimeIndex - KeySchema: - - AttributeName: userId - KeyType: HASH - - AttributeName: expireTimeMs - KeyType: RANGE - Projection: - ProjectionType: ALL - - PoliciesTable: - Type: AWS::DynamoDB::Table - Properties: - BillingMode: PAY_PER_REQUEST - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: marker - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: marker - AttributeType: S - RolesTable: - Type: AWS::DynamoDB::Table - Properties: - BillingMode: PAY_PER_REQUEST - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: role - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: role - AttributeType: S - - SubjectRolesTable: - Type: AWS::DynamoDB::Table - Properties: - BillingMode: PAY_PER_REQUEST - KeySchema: - - AttributeName: subjectId - KeyType: HASH - - AttributeName: recordName - KeyType: RANGE - AttributeDefinitions: - - AttributeName: subjectId - AttributeType: S - - AttributeName: recordName - AttributeType: S - - RoleSubjectsTable: - Type: AWS::DynamoDB::Table - Properties: - BillingMode: PAY_PER_REQUEST - KeySchema: - - AttributeName: roleId - KeyType: HASH - - AttributeName: subjectId - KeyType: RANGE - AttributeDefinitions: - - AttributeName: roleId - AttributeType: S - - AttributeName: subjectId - AttributeType: S - - # DynamoDB table to store records - RecordsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: issuer - KeyType: HASH - - AttributeName: address - KeyType: RANGE - AttributeDefinitions: - - AttributeName: issuer - AttributeType: S - - AttributeName: address - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - EmailRulesTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: id - KeyType: HASH - AttributeDefinitions: - - AttributeName: id - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - SmsRulesTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: id - KeyType: HASH - AttributeDefinitions: - - AttributeName: id - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - FilesBucket: Type: AWS::S3::Bucket DeletionPolicy: Retain @@ -533,104 +290,6 @@ Resources: Rules: - ObjectOwnership: BucketOwnerPreferred - PublicRecordsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - PublicRecordsKeysTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: secretHash - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: secretHash - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - DataTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: address - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: address - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - ManualDataTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: address - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: address - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - FilesTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: fileName - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: fileName - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - - EventsTable: - Type: AWS::DynamoDB::Table - Properties: - KeySchema: - - AttributeName: recordName - KeyType: HASH - - AttributeName: eventName - KeyType: RANGE - AttributeDefinitions: - - AttributeName: recordName - AttributeType: S - - AttributeName: eventName - AttributeType: S - ProvisionedThroughput: - ReadCapacityUnits: 2 - WriteCapacityUnits: 2 - Outputs: WebEndpoint: Description: 'API Gateway endpoint URL for Prod stage' From bea8865ad3e28fe5b5797a9c75c5d25a60976707 Mon Sep 17 00:00:00 2001 From: KallynGowdy Date: Mon, 19 Jun 2023 14:30:39 -0400 Subject: [PATCH 2/3] chore: Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9462652e71..c602791edd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CasualOS Changelog +## V3.1.33 + +#### Date: TBD + +### :rocket: Improvements + +- Removed unused DynamoDB tables from the backend. + ## V3.1.32 #### Date: 6/17/2023 From 0cf7b85d8e7eb3662bba6b929ff52ca362cc1ea8 Mon Sep 17 00:00:00 2001 From: DevOps Date: Mon, 19 Jun 2023 19:03:31 +0000 Subject: [PATCH 3/3] chore: Update CHANGELOG Date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c602791edd..4c162f9a41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## V3.1.33 -#### Date: TBD +#### Date: 6/19/2023 ### :rocket: Improvements