aws-samples / aws-samples/sam-python-crud-sample

Table Parameter Overrides Not Used When Creating DynamoDB Table

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
105
派生
64
PR 合并指标
30 天内没有已合并 PR

描述

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. sam build
2. sam deploy --guided
3. invoke URL from Curl or browser, value found on GET resource in API Gateway console
4. when prompted for table name, use another value like FBActivities or CodeActivities, rather than default of Activities

You will see "internal server error", and CloudWatch

/aws/lambda/crud-sam-app-ListActivitiesFunction-kVMgyUAS17TY
"Access denied exception when calling Scan operation." ListActivitiesFunctionRole.
arn:aws:dynamodb:us-east-1:654654165497:table/FBActivities

**Expected behavior**
Should show empty screen

**Desktop (please complete the following information):**
Windows 11

**Additional context**
I changed the last line below to make the fix

ActivitiesTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
-
AttributeName: "id"
AttributeType: "S"
-
AttributeName: "date"
AttributeType: "S"
KeySchema:
-
AttributeName: "id"
KeyType: "HASH"
-
AttributeName: "date"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "1"
WriteCapacityUnits: "1"
TableName: !Ref Table

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。