You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`DYNAMODB_ENDPOINT`|`http://localhost:4566`| Endpoint for the app to access DynamoDB |
79
+
|`S3_ENDPOINT`|`http://localhost:4566`| Endpoint for the app to access S3 |
79
80
|`ELIGIBILITY_TABLE_NAME`|`test_eligibility_datastore`| AWS DynamoDB table for person data. |
80
-
|`LOG_LEVEL`|`WARNING`| Logging level. Must be one of `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL` as per [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) |
81
+
|`LOG_LEVEL`|`WARNING`| Logging level. Must be one of `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL` as per [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) |
81
82
|`RULES_BUCKET_NAME`|`test-rules-bucket`| AWS S3 bucket from which to read rules. |
82
83
84
+
#### Environment variables - DEV, PROD or PRE-PROD
|`AWS_ACCESS_KEY_ID`| None | AWS Access Key |**AWS_ACCESS_KEY_ID** is set to None, <br/>because it is provided by the AWS environment automatically. |
90
+
|`AWS_SECRET_ACCESS_KEY`| None | AWS Secret Access Key |**AWS_SECRET_ACCESS_KEY** is set to None, <br/>because it is provided by the AWS environment automatically. |
91
+
|`DYNAMODB_ENDPOINT`| None | Endpoint for the app to access DynamoDB |**DYNAMODB_ENDPOINT** are set to None, <br/>since we are using aws service default endpoints which are provided automatically. |
92
+
|`S3_ENDPOINT`| None | Endpoint for the app to access S3 |**S3_ENDPOINT** are set to None, <br/>since we are using aws service default endpoints which are provided automatically. |
93
+
|`ELIGIBILITY_TABLE_NAME`|`test_eligibility_datastore`| AWS DynamoDB table for person data. ||
94
+
|`LOG_LEVEL`|`WARNING`| Logging level. Must be one of `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL` as per [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) ||
95
+
|`RULES_BUCKET_NAME`|`test-rules-bucket`| AWS S3 bucket from which to read rules. ||
96
+
83
97
## Usage
84
98
85
99
After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features.
@@ -128,25 +142,91 @@ Local tests will use [localstack](https://www.localstack.cloud/), started & stop
128
142
129
143
### Diagrams
130
144
131
-
The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points.
The source for diagrams should be in Git for change control and review purposes. Recommendations are [draw.io](https://app.diagrams.net/) (example above in [docs](.docs/diagrams/) folder) and [Mermaids](https://github.com/mermaid-js/mermaid). Here is an example Mermaids sequence diagram:
136
-
137
145
```mermaid
138
-
sequenceDiagram
139
-
User->>+Service: GET /users?params=...
140
-
Service->>Service: auth request
141
-
Service->>Database: get all users
142
-
Database-->>Service: list of users
143
-
Service->>Service: filter users
144
-
Service-->>-User: list[User]
145
-
```
146
+
graph TB
147
+
subgraph "System Context"
148
+
direction TB
149
+
Client["NHS App / Client"]
150
+
Consumer["Postman / Consumer"]
151
+
API["Eligibility Signposting API"]
152
+
AWS["AWS"]
153
+
end
154
+
155
+
Client -->|"HTTP Request"| API
156
+
Consumer -->|"HTTP Request"| API
157
+
API -->|"Deployed on"| AWS
158
+
159
+
subgraph "Container Diagram"
160
+
direction TB
161
+
subgraph "AWS Infrastructure"
162
+
direction TB
163
+
APIGW["API Gateway"]
164
+
Lambda["Python Lambda (app.py)"]
165
+
DynamoDB["DynamoDB Table"]
166
+
S3Bucket["S3 Bucket (rules)"]
167
+
IAM["IAM Roles & Policies"]
168
+
end
169
+
subgraph "CI/CD Pipeline"
170
+
direction TB
171
+
GH["GitHub Actions"]
172
+
TF["Terraform"]
173
+
end
174
+
end
175
+
176
+
Client -->|"HTTPS POST /eligibility"| APIGW
177
+
APIGW -->|"Invoke"| Lambda
178
+
Lambda -->|"GetItem/PutItem"| DynamoDB
179
+
Lambda -->|"GetObject"| S3Bucket
180
+
Lambda -->|"Uses"| IAM
181
+
182
+
GH -->|"runs pipelines"| TF
183
+
TF -->|"provisions"| APIGW
184
+
TF -->|"provisions"| DynamoDB
185
+
TF -->|"provisions"| S3Bucket
186
+
TF -->|"provisions"| IAM
187
+
188
+
subgraph "Eligibility Lambda Function - Components"
Most of the projects are built with customisability and extendability in mind. At a minimum, this can be achieved by implementing service level configuration options and settings. The intention of this section is to show how this can be used. If the system processes data, you could mention here for example how the input is prepared for testing - anonymised, synthetic or live data.
0 commit comments