{"id":18485896,"url":"https://github.com/biomapas/b.cfnopensearchindex","last_synced_at":"2026-05-07T13:03:18.934Z","repository":{"id":45332963,"uuid":"436539541","full_name":"Biomapas/B.CfnOpenSearchIndex","owner":"Biomapas","description":"AWS CDK based resource that creates and manages OpenSearch (formerly ElasticSearch) index.","archived":false,"fork":false,"pushed_at":"2022-08-08T12:17:35.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-19T14:26:07.538Z","etag":null,"topics":["aws","aws-cdk","aws-cdk-python","aws-cloudformation","aws-elasticsearch","aws-opensearch","elasticsearch","index","opensearch","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Biomapas.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-09T08:33:43.000Z","updated_at":"2021-12-20T13:52:53.000Z","dependencies_parsed_at":"2022-08-12T11:51:41.250Z","dependency_job_id":null,"html_url":"https://github.com/Biomapas/B.CfnOpenSearchIndex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Biomapas/B.CfnOpenSearchIndex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biomapas%2FB.CfnOpenSearchIndex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biomapas%2FB.CfnOpenSearchIndex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biomapas%2FB.CfnOpenSearchIndex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biomapas%2FB.CfnOpenSearchIndex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Biomapas","download_url":"https://codeload.github.com/Biomapas/B.CfnOpenSearchIndex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Biomapas%2FB.CfnOpenSearchIndex/sbom","scorecard":{"id":22173,"data":{"date":"2025-08-11","repo":{"name":"github.com/Biomapas/B.CfnOpenSearchIndex","commit":"c4eb735012550b1d8135983f152eeca0c6492eaf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Code-Review","score":8,"reason":"Found 6/7 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pipeline-master.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline-master.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/Biomapas/B.CfnOpenSearchIndex/pipeline-master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline-master.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/Biomapas/B.CfnOpenSearchIndex/pipeline-master.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pipeline-master.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/Biomapas/B.CfnOpenSearchIndex/pipeline-master.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/pipeline-master.yaml:32","Warn: pipCommand not pinned by hash: .github/workflows/pipeline-master.yaml:34","Warn: pipCommand not pinned by hash: .github/workflows/pipeline-master.yaml:45","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T17:04:06.708Z","repository_id":45332963,"created_at":"2025-08-14T17:04:06.708Z","updated_at":"2025-08-14T17:04:06.708Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271252993,"owners_count":24726918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-cdk","aws-cdk-python","aws-cloudformation","aws-elasticsearch","aws-opensearch","elasticsearch","index","opensearch","python3"],"created_at":"2024-11-06T12:47:04.429Z","updated_at":"2026-05-07T13:03:13.893Z","avatar_url":"https://github.com/Biomapas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# B.CfnOpenSearchIndex\n\n**b-cfn-opensearch-index** - AWS CloudFormation custom resource that handles the creation, update and removals of OpenSearch indexes.\n\n### Description\n\nWhile you can create an OpenSearch index just by using a document as a base, using this AWS CDK resource lets you create an empty index for later use.\u003cbr\u003e\nThe resource supports **update** action, however, there are some limitations (please refer to \"Known limits\").\u003cbr\u003eUpdate action triggers reindexing of documents by default to prevent data loss.\u003cbr\u003e\nThe resource also supports **delete** action, where removal of created index removes all previously created indexes.\u003cbr\u003e**Attention** removal of indexes destroys all indexed documents.\n\n### Remarks\n\n[Biomapas](https://biomapas.com) aims to modernise life-science\nindustry by sharing its IT knowledge with other companies and\nthe community.\n\n### Related technology\n\n- Python 3.8\n- OpenSearch\n- Amazon Web Services (AWS)\n- AWS CloudFormation\n- AWS Cloud Development Kit (CDK)\n\n### Assumptions\n\n- You have basic-good knowledge in python programming.\n- You have basic-good knowledge in AWS and CloudFormation.\n- You have basic-good knowledge in OpenSearch.\n\n### Useful sources\n\n- Read more about Cloud Formation: https://docs.aws.amazon.com/cloudformation/index.html\n- Read more about Opensearch: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/remote-reindex.html\n\n### Install\n\nUse the package manager pip to install this package. This project is not in the PyPi\nrepository yet. Install directly from source or PyPI.\n\n```bash\npip install .\n```\n\nOr\n\n```bash\npip install b-cfn-opensearch-index\n```\n\n### Usage \u0026 Examples\n\nUsage of this AWS CloudFormation custom resource is quite simple. Initialize it within any valid CDK scope giving a unique name, OpenSearch domain endpoint, index name prefix, and settings/mappings of the index.\n\nBellow is an example:\n\n```python\nfrom aws_cdk.core import Stack\n\nfrom b_cfn_opensearch_index.resource import OpensearchIndex\n\n\nclass ExampleOpensearchIndexStack(Stack):\n    def __init__(self, scope: Stack, opensearch_domain_endpoint: str) -\u003e None:\n        super().__init__(scope=scope, id='ExampleOpensearchIndexStack')\n\n        # Define index settings.\n        index_settings = {\n             'index.refresh_interval': '2s',\n        }\n\n        # Define index mappings.\n        index_mappings = {\n            'id': {\n                'type': 'keyword'\n            },\n            'author': {\n                'type': 'keyword'\n            },\n            'title': {\n                'type': 'keyword'\n            },\n            'content': {\n                'type': 'text'\n            },\n            'timestamp': {\n                'type': 'date',\n                'format': 'yyyy-MM-dd HH:mm:ss||epoch_millis'\n            },\n        }\n\n        # Initialize AWS CloudFormation custom resource using given OpenSearch\n        # domain endpoint with defined settings and mappings of the index.\n        self.index = OpensearchIndex(\n            scope=self,\n            name='OpensearchIndex',\n            opensearch_domain_endpoint=opensearch_domain_endpoint,\n            index_prefix='example-index-prefix',\n            index_settings=index_settings\n            index_mapping_settings=index_mappings\n        )\n\n```\n\nIn the example above, we created an OpenSearch index with two dictionaries for settings and mappings of the index. More information about settings and mappings of the index can be found here https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/.\n\nIndex prefix can be any string that complies with index naming restrictions listed in section **Known limits**.\n\nOn change of index name (index prefix), reindex of all documents will be triggered. If there is a need to skip reindex of the documents please set **`reindex`** parameter with the value **`False`**.\n\n```python\n\nself.index = OpensearchIndex(\n    scope=self,\n    name='OpensearchIndex',\n    opensearch_domain_endpoint=opensearch_domain_endpoint,\n    index_prefix='example-index-prefix',\n    index_settings=index_settings\n    index_mapping_settings=index_mappings,\n    reindex=False\n)\n```\n\nFollowing parameters are optional and can be omitted:\n\n- `index_settings`\n- `index_mappings`\n- `reindex`\n\n### Known limits\n\nThere are some limitations. Currently, reindex of documents is not possible if the OpenSearch domain endpoint changes.\u003cbr\u003e\u003cbr\u003e\nUpdate settings and mappings of the index have some limitations too:\u003cbr\u003e\n\n- Update of static index settings is not possible. Static index settings can be set only at the moment of index creation.\u003cbr\u003e\n- Change of index mappings field types is not possible. Setup of field types only at the moment of index creation. To bypass this limitation, trigger index update by changing index name with new index mappings. (example at Usage \u0026 Examples).\u003cbr\u003e\n- There are some index naming restrictions. Keep in mind those restriction at the moment of index prefix setup.\u003cbr\u003e\n  - Index names can’t begin with underscores (\\_) or hyphens (-).\n  - Index names can’t contain spaces, commas, or the following characters: \u003cbr\u003e\n    ```\n    :, \", *, +, /, \\, |, ?, #, \u003e, or \u003c\n    ```\n\n### Testing\n\nThis project has integration tests based on pytest. To run tests, simply run:\n\n```\npytest\n```\n\n### Contribution\n\nFound a bug? Want to add or suggest a new feature?\u003cbr\u003e\nContributions of any kind are gladly welcome. You may contact us\ndirectly, create a pull-request or an issue in github platform.\nLets modernize the world together.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomapas%2Fb.cfnopensearchindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiomapas%2Fb.cfnopensearchindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomapas%2Fb.cfnopensearchindex/lists"}