From 81eb6d281807197770d431d1b68d85ed72884dbf Mon Sep 17 00:00:00 2001 From: Abner Kaizer Date: Mon, 8 Apr 2024 10:35:06 -0300 Subject: [PATCH 1/2] Deprecation fix in the aws-python-rest-api-with-dynamodb example. --- aws-python-rest-api-with-dynamodb/serverless.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws-python-rest-api-with-dynamodb/serverless.yml b/aws-python-rest-api-with-dynamodb/serverless.yml index e14fec549..7013e8a97 100644 --- a/aws-python-rest-api-with-dynamodb/serverless.yml +++ b/aws-python-rest-api-with-dynamodb/serverless.yml @@ -1,4 +1,4 @@ -service: serverless-rest-api-with-dynamodb +service: rest frameworkVersion: "3" @@ -6,7 +6,7 @@ provider: name: aws runtime: python3.9 environment: - DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage} + DYNAMODB_TABLE: ${self:service}-${sls:stage} iam: role: statements: @@ -18,7 +18,7 @@ provider: - dynamodb:PutItem - dynamodb:UpdateItem - dynamodb:DeleteItem - Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:provider.environment.DYNAMODB_TABLE}" + Resource: "arn:aws:dynamodb:${aws:region}:*:table/${self:provider.environment.DYNAMODB_TABLE}" functions: create: From b34b82360a4396cd4e400f74d3e5873754625932 Mon Sep 17 00:00:00 2001 From: Abner Kaizer Date: Mon, 8 Apr 2024 10:49:35 -0300 Subject: [PATCH 2/2] Service name changed to the original. --- aws-python-rest-api-with-dynamodb/serverless.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws-python-rest-api-with-dynamodb/serverless.yml b/aws-python-rest-api-with-dynamodb/serverless.yml index 7013e8a97..07bf678ac 100644 --- a/aws-python-rest-api-with-dynamodb/serverless.yml +++ b/aws-python-rest-api-with-dynamodb/serverless.yml @@ -1,4 +1,4 @@ -service: rest +service: serverless-rest-api-with-dynamodb frameworkVersion: "3"