-**[YourBucketName]**: The name of the S3 bucket containing the PDF files.
-**[YourVectorDBEndpoint]**: Endpoint for the vector database.
-**[YourVectorDBEndpoint]**: Endpoint of the vector database.
-**[Index_name]**: The index_name where to store the embeddings in the collection.
-**[local_path]**: local_path
...
...
@@ -70,22 +69,22 @@ The vectorise-store.py script will:
### Step 1: Preparation
Before deploying the chatbot on an EC2 instance, complete the following preliminary steps:
1. Create a Key Pair: This key pair will be used for SSH access to your EC2 instance whe you need it.
1. Create a Key Pair: This key pair will be used for SSH access to your EC2 instance.
2. Create a Security Group: Define rules to allow the instance to be accessible externally. The security group should include the following rules:
- For inbound rules: you need to allow SSH traffic, HTTP/HTTPs trafic and open port 8501 used by the application.
- For inbound rules: you need to allow SSH traffic, HTTP/HTTPs traffic and open port 8501 used by the application.
- Outbound Rules: Allow all traffic.
3. Prepare config.ini: Ensure your config.ini file includes your AWS credentials (aws_access_key_id, aws_secret_access_key, region), with the region set to 'us-east-1'. Also, include the endpoint and index_name for the OpenSearch service established earlier.
### Step 2: Launching the Instance
Utilize the provided create_instance.py script to deploy your EC2 instance with the essential startup configurations. Before executing this, adjust Security Group and Key Pair already created in the first step.
Use the provided create_instance.py script to deploy your EC2 instance with the essential startup configurations. Before executing this, adjust Security Group and Key Pair already created in the first step.
In the `ec2.create_instance` we have the following parameters:
- ImageId: `ami-05747e7a13dac9d14`, this is a custom Amazon Machine Image (AMI) that contains all the configurations and dependencies required for the chatbot application.
- UserData: is used to run script after the instance starts. The script will put the credentials in the instance so that the instance can aceess other services in AWS, and the endpoint for the Vector DB, index name. Then the script will run the application.
- UserData: is used to run script after the instance starts. The script will put the credentials in the instance so that the instance can aceess other services in AWS, the endpoint of the Vector DB, and the index name. Then the script will run the application.