aws-samples / aws-samples/amazon-interactive-slack-app-starter-kit

Need to modify DynamoDB Json when creating a table item

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
19
Forks
4
PR merge metrics
No merged PRs in 30d

Description

[Section 5](https://github.com/aws-samples/amazon-interactive-slack-app-starter-kit?tab=readme-ov-file#5-configure-resources-with-slack-app-secrets-and-slack-users
) in README suggests the following json format when creating in a table item:

```json
{
"slackUserName": "",
"permittedActions": [
"sample-lambda",
"sample-sm"
]
}
```

However this raises the following error:

```
An error occurred while executing the state 'Map User Actions' (entered at the event id #21). Invalid path '$.getUserResult.Item.permittedActions.SS' : No results for path: $['getUserResult']['Item']['permittedActions']['SS']
```

As Lambda function accesses the path $['getUserResult']['Item']['permittedActions']['SS'], the correct json format is:

```json
{
"slackUserName": {
"S": "",
},
"permittedActions": {
"SS": [
"sample-lambda",
"sample-sm"
]
}
}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.