Deleting a HealthLake data store
Use DeleteFHIRDatastore
to delete a HealthLake data store. The following menus provide a
procedure for the AWS Management Console and code examples for the AWS CLI and AWS SDKs. For more information, see
DeleteFHIRDatastore
in the AWS HealthLake API Reference.
To delete a HealthLake data store
Choose a menu based on your access preference to AWS HealthLake.
- CLI
-
- AWS CLI
-
To delete a FHIR Data Store
The following delete-fhir-datastore
example demonstrates how to delete a Data Store and all of its contents in Amazon HealthLake.
aws healthlake delete-fhir-datastore \
--datastore-id (Data
Store
ID)
\
--region us-east-1
Output:
{
"DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/(Datastore ID)/r4/",
"DatastoreArn": "arn:aws:healthlake:us-east-1:(AWS Account ID):datastore/(Datastore ID)",
"DatastoreStatus": "DELETING",
"DatastoreId": "(Datastore ID)"
}
For more information, see Creating and monitoring a FHIR Data Store <https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html> in the Amazon 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 delete_fhir_datastore(self, datastore_id: str) -> None:
"""
Deletes a HealthLake data store.
:param datastore_id: The data store ID.
"""
try:
self.health_lake_client.delete_fhir_datastore(DatastoreId=datastore_id)
except ClientError as err:
logger.exception(
"Couldn't delete data store with ID %s. Here's why %s",
datastore_id,
err.response["Error"]["Message"],
)
raise
Can't find what you need? Request a code example using the Provide
feedback link on the right sidebar of this page.
-
Sign in to the Data stores page on the HealthLake Console.
-
Choose a data store.
The Data store details page opens.
-
Choose Delete.
The Delete data store page opens.
-
To confirm data store deletion, enter the data store name in the
text input field.
-
Choose Delete.