Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use ListFHIRDatastores with an AWS SDK or CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use ListFHIRDatastores with an AWS SDK or CLI

The following code examples show how to use ListFHIRDatastores.

CLI
AWS CLI

To list FHIR data stores

The following list-fhir-datastores example shows to how to use the command and how users can filter results based on data store status in AWS HealthLake.

aws healthlake list-fhir-datastores \ --filter DatastoreStatus=ACTIVE

Output:

{ "DatastorePropertiesList": [ { "PreloadDataConfig": { "PreloadDataType": "SYNTHEA" }, "SseConfiguration": { "KmsEncryptionConfig": { "CmkType": "CUSTOMER_MANAGED_KMS_KEY", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" } }, "DatastoreName": "Demo", "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Data store ID>", "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Data store ID>/r4/", "DatastoreStatus": "ACTIVE", "DatastoreTypeVersion": "R4", "CreatedAt": 1603761064.881, "DatastoreId": "<Data store ID>", "IdentityProviderConfiguration": { "AuthorizationStrategy": "AWS_AUTH", "FineGrainedAuthorizationEnabled": false } } ] }

For more information, see Creating and monitoring a FHIR data store in the AWS HealthLake Developer Guide.

Python
SDK for Python (Boto3)
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def list_fhir_datastores(self) -> list[dict[str, any]]: """ Lists all HealthLake data stores. :return: A list of data store descriptions. """ try: next_token = None datastores = [] # Loop through paginated results. while True: parameters = {} if next_token is not None: parameters["NextToken"] = next_token response = self.health_lake_client.list_fhir_datastores(**parameters) datastores.extend(response["DatastorePropertiesList"]) if "NextToken" in response: next_token = response["NextToken"] else: break return datastores except ClientError as err: logger.exception( "Couldn't list data stores. Here's why %s", err.response["Error"]["Message"] ) raise
Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

AWS CLI

To list FHIR data stores

The following list-fhir-datastores example shows to how to use the command and how users can filter results based on data store status in AWS HealthLake.

aws healthlake list-fhir-datastores \ --filter DatastoreStatus=ACTIVE

Output:

{ "DatastorePropertiesList": [ { "PreloadDataConfig": { "PreloadDataType": "SYNTHEA" }, "SseConfiguration": { "KmsEncryptionConfig": { "CmkType": "CUSTOMER_MANAGED_KMS_KEY", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" } }, "DatastoreName": "Demo", "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Data store ID>", "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Data store ID>/r4/", "DatastoreStatus": "ACTIVE", "DatastoreTypeVersion": "R4", "CreatedAt": 1603761064.881, "DatastoreId": "<Data store ID>", "IdentityProviderConfiguration": { "AuthorizationStrategy": "AWS_AUTH", "FineGrainedAuthorizationEnabled": false } } ] }

For more information, see Creating and monitoring a FHIR data store in the AWS HealthLake Developer Guide.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.