aws / aws/chalice

Add support for resource types in policy generation

Open
#118 4 comments 9 reactions 0 assignees View on GitHub
feature-request
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

This code snippet is a simplified version of the examples in the [Boto3 docs](http://boto3.readthedocs.io/en/latest/guide/dynamodb.html#getting-an-item)

```
import boto3

db = boto3.resource("dynamodb")
tbl = db.Table('mytable')
r = tbl.get_item(Key={'mykey': myval})
```

The policy generator misses that this will need to add a `dynamodb:GetItem`.

In contrast, the policy generator does notice it when using this (more low-level) snippet:

```
dbc = boto3.client("dynamodb")
r = dbc.get_item(TableName="mytable", Key={"mykey": {"S": myval }})
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two Boto3 examples in the issue and inspect the policy generator's handling of DynamoDB calls. Compare how client and resource API calls are identified. Done means the resource-based get_item example produces a policy containing dynamodb:GetItem, with the existing low-level behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.