awswrangler.opensearch.create_collection(name: str, collection_type: str = 'SEARCH', description: str = '', encryption_policy: Dict[str, Any] | List[Dict[str, Any]] | None = None, kms_key_arn: str | None = None, network_policy: Dict[str, Any] | List[Dict[str, Any]] | None = None, vpc_endpoints: List[str] | None = None, data_policy: List[Dict[str, Any]] | None = None, boto3_session: Session | None = None) Dict[str, Any]

Create Amazon OpenSearch Serverless collection.

Creates Amazon OpenSearch Serverless collection, corresponding encryption and network policies, and data policy, if data_policy provided.

More in [Amazon OpenSearch Serverless (preview)] (


This API is experimental and may change in future AWS SDK for Pandas releases.

  • name (str) – Collection name.

  • collection_type (str) – Collection type. Allowed values are SEARCH, and TIMESERIES.

  • description (str) – Collection description.

  • encryption_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) –

    Encryption policy of a form: { “Rules”: […] }

    If not provided, default policy using AWS-managed KMS key will be created. To use user-defined key, provide kms_key_arn.

  • kms_key_arn (str, optional) – Encryption key.

  • network_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) –

    Network policy of a form: [{ “Rules”: […] }]

    If not provided, default network policy allowing public access to the collection will be created. To create the collection in the VPC, provide vpc_endpoints.

  • vpc_endpoints (List[str], optional) – List of VPC endpoints for access to non-public collection.

  • data_policy (Union[Dict[str, Any], List[Dict[str, Any]]], optional) – Data policy of a form: [{ “Rules”: […] }]

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 Session will be used if boto3_session receive None.


Collection details – Collection details

Return type:

Dict[str, Any]