AWS-Logo_White-Color
1.
Preparation
2.
Create API and Lambda Functions
2.1.
Create Lambda Functions
2.2.
Create Search API
3.
Create OpenSearch Instance
4.
Test Web Operation
5.
Clean up
More
AWS Study Group - Blog
AWS Study Group - FB Group
English
Tiếng Việt
Clear History
Workshop
Cloud Journey
Last Updated
11-12-2024
Team
Gia Hưng
Hạnh Phạm
Serverless - Integrate AWS OpenSearch with a DynamoDB Stream
> Create OpenSearch Instance
Create OpenSearch Instance
Open
Amazon OpenSearch Service console
Click
Create domain
Enter domain name:
fcjdms
Selecting deployment type is
Development and testing
In
Data nodes
section:
Select 1 availability zone
Select
t3.small.search
for instance type
Enter
2
for number of nodes
Select
General Purpose (SSD) - gp2
for
EC2 volume type
Expand the
Dedicated master nodes
section and check to
Enbale dedicated master nodes
Selecting instance type is
t3.small.search
Select
Public access
for
Network
Select
Create master user
Enter username, password and confirm password
In the
Access policy
section, select
Only use fine-grained access control
Scroll down to bottom and click
Create
Wait a few minutes for the domain to initialize
Once the domain is ready, note down the domain endpoint and click the OpenSearch Dashboards URL.
Open the AWS Lambda console. Select
search_docs
function
Select
Configuration
tab
Select
Environment variables
on the left menu
Click
Edit
Click
Add environment variable
Enter
SEARCH_DOMAIN
for Key
Paste the OpenSearch domain endpoint to Value cell và delete
https://
Click
Save
Repeat steps 11 and 12 for
load_stream
function
Back to the OpenSearch Dashboards tab, and enter the user information you created. Then press
Log in
.
Open the menu in the upper left corner and select
Security
Select
Roles
on the left menu.
Select
all_access
Select
Mapped users
tab and click
Manage mapping
.
In the
Backend roles
section:
Enter the Role ARN of role that the
search_docs
is executing.
Click
Add another backend role
Enter the Role ARN of the role that the
load_stream
function is executing.
Click
Map
You have completed map the Lambda role to a user of OpenSearch domain.