Skip to content

StartFHIRExportJob

Source: src/AWS/HealthLake/StartFHIRExportJob.ts

Runtime binding for the StartFHIRExportJob operation (IAM action healthlake:StartFHIRExportJob), scoped to one FHIRDatastore.

Starts a bulk export of the bound data store’s FHIR R4 resources to S3 as NDJSON. The binding is constructed with the data store and the data-access role (the IAM role HealthLake assumes to write OutputDataConfig.S3Configuration.S3Uri, encrypted with its KmsKeyId; the role’s trust policy must allow healthlake.amazonaws.com). The role’s ARN is injected as DataAccessRoleArn on every runtime request and the host is granted iam:PassRole on it alongside healthlake:StartFHIRExportJob on the data store. Track the job with DescribeFHIRExportJob. Provide the implementation with Effect.provide(AWS.HealthLake.StartFHIRExportJobHttp).

// deploy time — bind the data store and the HealthLake data-access role
const startExport = yield* HealthLake.StartFHIRExportJob(datastore, dataAccessRole);
// runtime
const job = yield* startExport({
OutputDataConfig: {
S3Configuration: {
S3Uri: "s3://my-bucket/fhir-export/",
KmsKeyId: kmsKeyArn,
},
},
});
// job.JobId, job.JobStatus === "SUBMITTED"