Skip to content

Commit 2cf8f55

Browse files
authored
updated for pyenv, direnv, AWS access (#646)
1 parent e3c5e74 commit 2cf8f55

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,17 @@ Once connected, you should see the path as something similar to: `/mnt/d/Source/
108108
109109
5. Configure pyenv.
110110
```
111-
pyenv install --list | grep "3.10"
112-
pyenv install 3.10.16 #current latest
111+
pyenv install --list | grep "3.11"
112+
pyenv install 3.11.13 #current latest
113113
```
114114
115-
6. Install poetry
115+
6. Install direnv if not already present, and hook it to the shell.
116+
```
117+
sudo apt-get update && sudo apt-get install direnv
118+
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
119+
```
120+
121+
7. Install poetry
116122
```
117123
pip install poetry
118124
```
@@ -125,8 +131,9 @@ For detailed instructions on running individual Lambdas, refer to the README.md
125131
Steps:
126132
1. Set the python version in the folder with the code used by lambda for example `./backend` (see [lambdas](#lambdas)) folder.
127133
```
128-
pyenv local 3.10.16 # Set version in backend (this creates a .python-version file)
134+
pyenv local 3.11.13 # Set version in backend (this creates a .python-version file)
129135
```
136+
Note: consult the lambda's `pyproject.toml` file to get the required Python version for this lambda. At the time of writing, this is `~3.10` for the batch lambdas and `~3.11` for all the others.
130137
131138
2. Configure poetry
132139
```
@@ -203,4 +210,13 @@ The root (`immunisation-fhir-api`) should point to `/mnt/d/Source/immunisation-f
203210
## Verified commits
204211
Please note that this project requires that all commits are verified using a GPG key.
205212
To set up a GPG key please follow the instructions specified here:
206-
https://docs.github.com/en/authentication/managing-commit-signature-verification
213+
https://docs.github.com/en/authentication/managing-commit-signature-verification
214+
215+
216+
## AWS configuration: Getting credentials for AWS federated user account
217+
218+
In the 'Access keys' popup menu under AWS Access Portal:
219+
220+
**NOTE** that AWS's 'Recommended' method of getting credentials **(AWS IAM Identity Center credentials)** will break mocking in unit tests; specifically any tests calling `dynamodb_client.create_table()` will fail with `botocore.errorfactory.ResourceInUseException: Table already exists`.
221+
222+
Instead, use **Option 2 (Add a profile to your AWS credentials file)**.

0 commit comments

Comments
 (0)