Skip to content

Commit ddb8791

Browse files
PDM-892: adding HealthLake, STS and ECS client creation function
1 parent 93227e0 commit ddb8791

File tree

3 files changed

+67
-2
lines changed

3 files changed

+67
-2
lines changed

nhs_aws_helpers/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
from mypy_boto3_dynamodb.client import DynamoDBClient
5151
from mypy_boto3_dynamodb.service_resource import DynamoDBServiceResource, Table
5252
from mypy_boto3_dynamodb.type_defs import KeysAndAttributesTypeDef
53+
from mypy_boto3_ecs.client import ECSClient
5354
from mypy_boto3_events import EventBridgeClient
5455
from mypy_boto3_firehose import FirehoseClient
5556
from mypy_boto3_glue import GlueClient
57+
from mypy_boto3_healthlake.client import HealthLakeClient
5658
from mypy_boto3_kms.client import KMSClient
5759
from mypy_boto3_lambda.client import LambdaClient
5860
from mypy_boto3_logs.client import CloudWatchLogsClient
@@ -72,6 +74,7 @@
7274
from mypy_boto3_sqs.client import SQSClient
7375
from mypy_boto3_ssm.client import SSMClient
7476
from mypy_boto3_stepfunctions import SFNClient
77+
from mypy_boto3_sts.client import STSClient
7578

7679
from nhs_aws_helpers.common import run_in_executor
7780
from nhs_aws_helpers.s3_object_writer import S3ObjectWriter
@@ -349,6 +352,20 @@ def events_client(session: Optional[Session] = None, config: Optional[Config] =
349352
return _aws("events", "client", session, config) # type: ignore[no-any-return]
350353

351354

355+
def healthlake_client(session: Optional[Session] = None, config: Optional[Config] = None) -> HealthLakeClient:
356+
return _aws("healthlake", "client", session, config) # type: ignore[no-any-return]
357+
358+
359+
def sts_client(
360+
session: Optional[Session] = None, config: Optional[Config] = None, endpoint_url: Optional[str] = None
361+
) -> STSClient:
362+
return _aws("sts", "client", session, config) # type: ignore[no-any-return]
363+
364+
365+
def ecs_client(session: Optional[Session] = None, config: Optional[Config] = None) -> ECSClient:
366+
return _aws("ecs", "client", session, config) # type: ignore[no-any-return]
367+
368+
352369
def s3_bucket(bucket: str, session: Optional[Session] = None, config: Optional[Config] = None) -> Bucket:
353370
return s3_resource(session=session, config=config).Bucket(bucket)
354371

poetry.lock

Lines changed: 49 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repository = "https://github.com/NHSDigital/nhs-aws-helpers"
1515
# core dependencies
1616
python = ">=3.9,<4.0"
1717
boto3 = "^1.38.14"
18-
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena", "glue", "ce", "cloudwatch", "backup"], version = "^1.38.6"}
18+
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena", "glue", "ce", "cloudwatch", "backup", "healthlake", "sts", "ecs"], version = "^1.38.6"}
1919
botocore-stubs = "^1.38.46"
2020

2121

0 commit comments

Comments
 (0)