Can you use CDK to configure openSearch serverless as a data source in AWS managed Grafana

0

Hi,

Can you use CDK to configure AWS openSearch serverless as a data source for AWS managed Grafana?

If so can you provide some sample code or point me in the right direction where it may exist?

Any help is Greatly appreciated,

Regards,

1개 답변
1

Looking at the CDK API reference, there are no L2 constructs available for AWS Managed Grafana, however L1 constructs are available. L1 constructs are designed to expect the same properties as using the AWS API directly. L2 constructs abstract another layer of implementation away from using the AWS API directly.

The L1 construct CfnWorkspace and it's associated properties CfnWorkspaceProps can be used to enable OpenSearch as a data source via the dataSourcesproperty in CfnWorkspaceProps. This only works if the IAM role in OpenSearch is configured properly to handle data from Managed Grafana and you are using CDK to create a new workspace in Managed Grafana.

If you would only like to update an existing workspace to add OpenSearch as a data source, you can use a CustomResource construct in CDK with the UpdateWorkspace API and the workspaceDataSources property (should be fine to use despite the documentation saying otherwise).

Hope this helps!

profile pictureAWS
전문가
답변함 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠