diff --git a/pulumi/__main__.py b/pulumi/__main__.py index 211c43c..c6fd091 100644 --- a/pulumi/__main__.py +++ b/pulumi/__main__.py @@ -1,7 +1,7 @@ """An AWS Python Pulumi program""" -import pulumi import pulumi_cloudflare +from lambda_utils import create_lambda_layer, create_lambda_zip from pulumi_aws import ( apigatewayv2, cloudwatch, @@ -12,10 +12,10 @@ scheduler, secretsmanager, ) - -from lambda_utils import create_lambda_layer, create_lambda_zip from telegram_provider import Webhook +import pulumi + RESOURCES_PREFIX = "erfiume" SYNC_MINUTES_RATE_NORMAL = 24 * 60 # Once a day SYNC_MINUTES_RATE_EMERGENCY = 20 @@ -35,9 +35,9 @@ ], ) -utenti_table = dynamodb.Table( +chats_table = dynamodb.Table( f"{RESOURCES_PREFIX}-users", - name="Utenti", + name="Chats", billing_mode="PAY_PER_REQUEST", hash_key="chatid", attributes=[ @@ -131,14 +131,14 @@ "dynamodb:Query", "dynamodb:GetItem", ], - "Resources": [stazioni_table.arn, utenti_table.arn], + "Resources": [stazioni_table.arn, chats_table.arn], }, { "Effect": "Allow", "Actions": [ "dynamodb:PutItem", ], - "Resources": [utenti_table.arn], + "Resources": [chats_table.arn], }, { "Effect": "Allow",