1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
The key part is the execution role of the Lambda: see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-lambda.html for a full CloudFormation template.
The key part for you is the execution role: replace below the auth for CloudWatch ('logs') with yours for OpenSearch ('aoss')
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
Path: /
Policies:
- PolicyName: root
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:*
Resource: arn:aws:logs:*:*:*
This page also will show you how to setup the various required AOSS policies: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-cfn.html
Best,
Didier
Relevant content
- asked 3 years ago
