Application
Learn how to create, update, and manage AWS OpenSearchService Applications using Alchemy Cloud Control.
The Application resource lets you manage AWS OpenSearchService Applications and their configuration settings.
Minimal Example
Section titled “Minimal Example”Create a basic OpenSearchService application with required properties and a data source.
import AWS from "alchemy/aws/control";
const openSearchApp = await AWS.OpenSearchService.Application("myOpenSearchApp", { name: "MySearchApplication", dataSources: [{ type: "s3", uri: "s3://my-data-source-bucket/data" }], endpoint: "https://mysearchapp.us-west-2.es.amazonaws.com", tags: [{ key: "Environment", value: "Development" }]});
Advanced Configuration
Section titled “Advanced Configuration”Configure an OpenSearchService application with IAM Identity Center options and multiple data sources.
const advancedOpenSearchApp = await AWS.OpenSearchService.Application("advancedOpenSearchApp", { name: "AdvancedSearchApplication", dataSources: [ { type: "s3", uri: "s3://my-data-source-bucket/data" }, { type: "dynamoDB", uri: "dynamodb://my-dynamodb-table" } ], iamIdentityCenterOptions: { enabled: true, identityStore: "my-identity-store" }, tags: [{ key: "Project", value: "SearchOptimization" }]});
Adoption of Existing Resources
Section titled “Adoption of Existing Resources”Create an OpenSearchService application that adopts existing resources if available.
const adoptOpenSearchApp = await AWS.OpenSearchService.Application("adoptOpenSearchApp", { name: "ExistingSearchApp", adopt: true, // Adopt existing resource instead of failing endpoint: "https://existingsearchapp.us-west-2.es.amazonaws.com", tags: [{ key: "Purpose", value: "Data Analysis" }]});
Custom Application Configurations
Section titled “Custom Application Configurations”Demonstrate how to configure application settings and retrieve specific metadata.
const customAppConfig = await AWS.OpenSearchService.Application("customAppConfig", { name: "CustomAppWithConfig", appConfigs: [{ key: "maxResultSize", value: "100" }], tags: [{ key: "Owner", value: "Team Alpha" }]});
// Access application ARN and creation timeconsole.log(`Application ARN: ${customAppConfig.arn}`);console.log(`Created on: ${customAppConfig.creationTime}`);