AWS Deployment Using Terraform Template
High-Level Architecture Overview
This section provides a conceptual overview of how the BlueRock instance is deployed on AWS EC2 and how its core components interact.
End-to-End Flow
Deployment scripts are executed from a user's desktop or client environment where AWS CLI is configured. The script uses AWS APIs to provision the required AWS Resources and deploy the BlueRock instance.
BlueRock EC2 Architecture Components
Architecture Diagram

BlueRock EC2 Architecture Components
A typical BlueRock Secure MCP Server EC2 deployment consists of the following AWS Resources/Services:
Virtual Private Cloud (VPC)
Provides an isolated networking environment in AWS where all BlueRock deployment resources are created.
Amazon VPC Gateway
Enables controlled inbound and outbound internet access for resources deployed inside the VPC.
Amazon EC2 (BlueRock Node)
Runs the BlueRock MCP Server using a hardened BlueRock AMI and hosts all runtime services.
Amazon Elastic Block Store (EBS)
Provides persistent block storage attached to the EC2 instance for operating system and application data.
Amazon S3 (BlueRock Config)
Stores BlueRock configuration files such as config.toml that are retrieved by the BlueRock control plane during runtime.
AWS Identity and Access Management (IAM) Role
Grants the EC2 instance permission to access required AWS services such as Amazon S3 and Amazon CloudWatch.
Amazon CloudWatc
Receives telemetry and monitoring data generated by the BlueRock MCP Server.
Amazon CloudWatch Logs
Stores runtime logs and security events generated by the BlueRock MCP Server for analysis and auditing.
User / Administrator
Manages and monitors the BlueRock deployment through AWS services such as CloudWatch and AWS Systems Manager (SSM).
Deployment types
BlueRock EC2 deployments support multiple deployment modes depending on networking and telemetry requirements:
Private
Deploys a single BlueRock EC2 instance into a private subnet, with outbound access via a NAT Gateway and management access enabled through AWS Systems Manager (SSM).
Public
Deploys a single BlueRock EC2 instance into a public subnet, allowing management access through SSH (if configured) and AWS Systems Manager (SSM).
Supported AMI Distributions
BlueRock Secure MCP Server supports the following Linux distributions. Each distribution has a corresponding AMI with a specific kernel version:
Name
Kernel Version
AMI NAME
Amazon Linux 2023
6.12.89
bluerock-release-26-23-1-amzlnx2023-6.12.89
Ubuntu 24.04
6.12.89
bluerock-release-26-23-1-ubuntu2404-6.12.89
Note: The AMI name includes the BlueRock release version, Linux distribution, and Kernel version, allowing users to identify compatibility directly from the AMI name
Prerequisites
AWS Requirements
Active AWS account
API key credentials configured in the local environment
AWS CLI should be installed, and key credentials should be configured
Required Packages
The BlueRock Deployment Package for EC2 is provided by BlueRock as part of customer onboarding. This package includes Terraform infrastructure-as-code (IaC) scripts required to deploy the BlueRock Secure MCP Server on AWS EC2.
Deployment Method
The following tools must be installed and configured in the local environment before running the deployment:
Terraform Required to execute the BlueRock Terraform deployment scripts.
Terraform installation guide: https://developer.hashicorp.com/terraform/downloads
AWS CLI Required for authentication, resource validation, and post-deployment verification.
AWS CLI installation and configuration guide: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
AWS Permissions Required
User permissions: The user executing the deployment script requires permissions to create the following AWS objects:
VPC, Subnets, Internet Gateway, Route Tables
EC2 instance
Security Group
IAM Profile
S3 bucket
Deployment Package Overview
Download and Extract Package
Download the BlueRock deployment package and extract it in your local environment.
Directory Structure
Public Deployment
Private/ External OTEL Deployment
Terraform Deployment
Configuration Parameters
Navigate to the Terraform deployment directory, copy the example variables file, and update the deployment parameters by editing the Terraform variables file:
Parameter Reference
The following table details the variables and parameters for the provided Terraform configuration block.
Parameter
Type
Description
region
String
The AWS region where the resources will be provisioned (e.g., us-east-1).
prefix
String
A naming prefix applied to all created resources to easily identify them (e.g., bluerock-ec2).
allow_ip
String
The CIDR block permitted to access the instance, typically used for restricting inbound SSH or API traffic (e.g., 10.0.0.0/32).
node_instance_type
String
The AWS EC2 instance size/type to provision for the BlueRock node (e.g., t3.xlarge).
sample_host_name
String
The designated hostname for the deployed instance.
ssh_key_name
String
The name of an existing AWS EC2 Key Pair used to authenticate SSH access to the instance.
ami_id
String
The specific Amazon Machine Image (AMI) ID used to launch the instance.
existing_vpc_id
String
The ID of an existing AWS VPC. If left empty (""), the Terraform module will create a new VPC.
existing_subnet_id
String
The ID of an existing AWS Subnet. If left empty (""), the Terraform module will create a new Subnet.
enable_external_otel
Boolean
Master toggle (true or false) to enable or disable the external OpenTelemetry (OTel) configuration.
existing_policy_bucket_name
String
(Optional) The name of an existing S3 bucket used for storing policies.
existing_telemetry_log_group_name
String
(Optional) The name of an existing AWS CloudWatch Log Group for routing telemetry logs.
existing_telemetry_log_stream_name
String
(Optional) The name of an existing AWS CloudWatch Log Stream within the designated Log Group.
Running the Deployment Script
Navigate to the Terraform deployment directory, initialize Terraform, review the execution plan, and apply the configuration to provision the BlueRock Secure MCP Server:
Capture outputs
The deployment will output critical information including:
EC2 instance Public IP
S3 bucket name
CloudWatch log group name
Post-Deployment Validation
This section verifies that the BlueRock Secure MCP Server has been deployed successfully and is functioning as expected.
Check Bluerock Instance
Check the instance status to confirm that the EC2 instance is running and has a public IP address assigned (for public deployments):
Check Instance Access
SSH Access
Check instance access to confirm SSH connectivity for public deployments by running the appropriate command for the selected AMI:
Verify BlueRock Control Plane Service
Verify that the BlueRock Control Plane service is running by checking that the bluerockd.service service is in the active (running) state.
bluerockd.service works on the configuration of bluerockd.toml file that resides at /etc/bluerock/bluerockd.toml in the BlueRock VM instance.
It is created automatically with Terraform and has the following parameters.
Parameter
Type
Description
runtime.metrics_timer
Integer
The interval (in seconds) at which metrics are collected or emitted (e.g., 1800).
runtime.state_dir
String
The directory path where the daemon maintains its internal state files (e.g., /var/lib/bluerockd/).
policy.public_key
String
The URI location (e.g., an S3 path) of the public key used to cryptographically verify the policy file's signature.
policy.poll_period
Integer
The frequency (in seconds) at which the system polls the source location for policy updates.
policy.source.location
String
The base URI or storage bucket path where the policy files are hosted.
policy.source.policy
String
The filename of the primary JSON policy document (e.g., policy.json).
policy.source.policy_sig
String
The filename of the cryptographic signature corresponding to the policy document (e.g., policy.json.sig).
policy.source.transport.auth_method
String
The authentication strategy used to access the policy source (e.g., default to use instance IAM roles/profiles).
policy.source.transport.region
String
The cloud provider region where the policy source bucket is located.
policy.engine.augment_events
Boolean
Controls whether evaluated policy events are augmented with additional system context before being logged or forwarded.
otlp.file
String
The absolute file path where local OpenTelemetry (OTel) events and logs are written.
otlp.http.url
String
The HTTP endpoint URL used to export OTel telemetry data to a collector or backend service.
Check OTEL Collector
Locate the OTEL config file:
Edit the
otel-config.yamlfile based on the requirements.Enable the otel service
Start the otel service
Check the status of the otel service
Verify Telemetry Events in AWS CloudWatch
Check CloudWatch logs:
Navigate to the CloudWatch Console

Go to Log Groups

Find the BlueRock Log Group

Verify:
Log entries are present
Events originate from the EC2 instance
Timestamps align with instance startup activity

Expected logs include runtime events emitted by the BlueRock Secure MCP Server.
Last updated