Skip to content

Commit 90a0486

Browse files
authored
Merge branch 'main' into release-3.0.0
2 parents 748215c + c2232aa commit 90a0486

20 files changed

+251
-52
lines changed

.github/workflows/bandit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- main
1111
- release-3.0.0
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
build:
1518
runs-on: ubuntu-latest

.github/workflows/cfn-nag.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
branches:
1414
- main
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821
runs-on: ubuntu-latest

.github/workflows/minimal-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
- release-3.0.0
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
Check:
1417

.github/workflows/snyk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Snyk
33
on:
44
workflow_dispatch
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
security:
811
runs-on: ubuntu-latest

.github/workflows/static-checking.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- main
1010
- release-3.0.0
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
Check:
1417

.github/workflows/unlabel-assigned-issue.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
issues:
44
types:
55
- assigned
6+
permissions:
7+
contents: read
8+
69
jobs:
710
unlabel-issue:
11+
permissions:
12+
issues: write # for andymckay/labeler to label issues
13+
pull-requests: write # for andymckay/labeler to label PRs
814
runs-on: ubuntu-latest
915
steps:
1016
- name: unlabel-issues

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ or
246246

247247
* To run a specific test function:
248248

249-
``pytest tests/test_db.py::test_sql``
249+
``pytest tests/test_mysql.py::test_read_sql_query_simple``
250250

251-
* To run all database test functions (Using 8 parallel processes):
251+
* To run all database test functions for MySQL (Using 8 parallel processes):
252252

253-
``pytest -n 8 tests/test_db.py``
253+
``pytest -n 8 tests/test_mysql.py``
254254

255255
* To run all data lake test functions for all python versions (Only if Amazon QuickSight is activated and Amazon OpenSearch template is deployed):
256256

CONTRIBUTING_COMMON_ERRORS.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,23 @@ https://stackoverflow.com/questions/54302793/dyld-library-not-loaded-usr-local-o
110110
brew install unixodbc
111111
```
112112

113-
-----
113+
-----
114+
115+
## CloudFormation Deployment
116+
117+
### Error Message
118+
119+
During the deployment of `aws-data-wrangler-databases`, the creation of the resource `CodeBuildTestRoleLFPermissions` fails with
120+
121+
```
122+
Resource does not exist or requester is not authorized to access requested permissions. (Service: AWSLakeFormation; Status Code: 400; Error Code: AccessDeniedException; Request ID: 14a26718-ee4e-49f2-a7ca-d308e49485f8; Proxy: null)
123+
```
124+
125+
### Solution
126+
127+
The IAM role used to deploy the CloudForation stack does not have permissions to assign permissions in AWS Lake Formation. The quickest solution is to find the IAM role and set it as an admin in Lake Formation.
128+
129+
In order to find the role:
130+
1. Navigate to the CloudFormation console in your account
131+
1. Select the `aws-data-wrangler-databases` stack which failed to deploy
132+
1. Under the "Stack info" tab, find the value for "IAM role". The name of the role should be in the following format: `arn:aws:iam::{ACCOUNT_ID}:role/cdk-{UUID}-cfn-exec-role-{ACCOUNT_ID}-{REGION}`

awswrangler/_config.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class _ConfigArg(NamedTuple):
4747
"lakeformation_endpoint_url": _ConfigArg(dtype=str, nullable=True, enforced=True),
4848
"dynamodb_endpoint_url": _ConfigArg(dtype=str, nullable=True, enforced=True),
4949
"secretsmanager_endpoint_url": _ConfigArg(dtype=str, nullable=True, enforced=True),
50+
"timestream_endpoint_url": _ConfigArg(dtype=str, nullable=True, enforced=True),
5051
# Botocore config
5152
"botocore_config": _ConfigArg(dtype=botocore.config.Config, nullable=True),
5253
"verify": _ConfigArg(dtype=str, nullable=True),
@@ -78,6 +79,7 @@ def __init__(self) -> None:
7879
self.lakeformation_endpoint_url = None
7980
self.dynamodb_endpoint_url = None
8081
self.secretsmanager_endpoint_url = None
82+
self.timestream_endpoint_url = None
8183
self.botocore_config = None
8284
self.verify = None
8385
self.distributed = all(importlib.util.find_spec(pkg) for pkg in ("modin", "ray"))
@@ -398,6 +400,15 @@ def secretsmanager_endpoint_url(self) -> Optional[str]:
398400
def secretsmanager_endpoint_url(self, value: Optional[str]) -> None:
399401
self._set_config_value(key="secretsmanager_endpoint_url", value=value)
400402

403+
@property
404+
def timestream_endpoint_url(self) -> Optional[str]:
405+
"""Property timestream_endpoint_url."""
406+
return cast(Optional[str], self["timestream_endpoint_url"])
407+
408+
@timestream_endpoint_url.setter
409+
def timestream_endpoint_url(self, value: Optional[str]) -> None:
410+
self._set_config_value(key="timestream_endpoint_url", value=value)
411+
401412
@property
402413
def botocore_config(self) -> botocore.config.Config:
403414
"""Property botocore_config."""

awswrangler/_databases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _get_connection_attributes_from_secrets_manager(
9090
user=secret_value["username"],
9191
password=secret_value["password"],
9292
host=secret_value["host"],
93-
port=secret_value["port"],
93+
port=int(secret_value["port"]),
9494
database=_dbname,
9595
ssl_context=None,
9696
)

0 commit comments

Comments
 (0)