Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

feat: update ddbToEs to handle multi-tenant records #91

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

carvantes
Copy link
Contributor

When records in ddb have a _tenantId the following happens in the ddbToEs lambda:

  • Minor reformatting of the DDB record before indexing in ES. _id must be removed and id is reverted to the FHIR resource id instead of being the DDB composite key.
  • Write to ES using a tenant-specific alias.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rsmayda
Copy link
Contributor

rsmayda commented Jun 28, 2021

Should we set _tenant_id as a keyword type?

@carvantes
Copy link
Contributor Author

Should we set _tenant_id as a keyword type?

yeah, that's probably better. I was thinking on letting dynamic mapping take care to make it backwards compatible, but multi-tenancy is a breaking change for several other reasons so it makes sense to add it to our mapping.

I'll make the change.

@carvantes carvantes merged commit 79c77f8 into feat-multitenancy Jun 30, 2021
@carvantes carvantes deleted the dev-ddbtoes-tenantid branch June 30, 2021 09:05
carvantes added a commit that referenced this pull request Aug 17, 2021
* feat: Add multi tenancy to S3 binary resource(#87)

* feat: tenant isolation for DDB CRUD operations (#86)

* feat: update ddbToEs to handle multi-tenant records (#91)

* feat: Multi tenancy bulk export (#90)

* fix: list bulk export files with tenant prefix (#94)

* feat: persistence change for group export (#98)

* feat: enable hard delete in Elasticsearch (#100)


Co-authored-by: zheyanyu <zheyanyu@amazon.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants