10.0.0.0/1610.0.0.0/20 → SBW_Project-subnet-public1-ap-southeast-1aSBW_EC2_WebDB (OLTP EC2).10.0.128.0/20 → SBW_Project-subnet-private1-ap-southeast-1aSBW_EC2_ShinyDWH and SBW_Lamda_ETL.Public Route Table
10.0.0.0/16 → local0.0.0.0/0 → Internet GatewayPrivate Route Table
10.0.0.0/16 → local0.0.0.0/0 to IGW or NAT Gateway
SBW_Lamda_ETLcom.amazonaws.ap-southeast-1.ssmcom.amazonaws.ap-southeast-1.ssmmessagescom.amazonaws.ap-southeast-1.ec2messagesThese endpoints enable Session Manager to manage and port-forward into SBW_EC2_ShinyDWH without any public IP or SSH port.
SBW_EC2_ShinyDWHOn the private EC2 instance:
clickstream_dwclickstream_events with fields:event_id
event_timestamp
event_name
user_id
user_login_state
identity_source
client_id
session_id
is_first_visit
context_product_id
context_product_name
context_product_category
context_product_brand
context_product_price
context_product_discount_price
context_product_url_path
The instance:
SBW_Lamda_ETL conect postgreSQL DB: clickstream_dwSBW_Lamda_ETL (Private subnet-Enabled)ETL Lambda is where batch processing happens.
VPC configuration:
SBW_Project-subnet-private1-ap-southeast-1asg_Lambda_ETLEnvironment variables:
DWH_HOST, DWH_PORT=5432, DWH_USER, DWH_PASSWORD, DWH_DATABASE=clickstream_dwRAW_BUCKET=clickstream-s3-ingestAWS_REGION=ap-southeast-1Task:
s3://clickstream-s3-ingest/events/YYYY/MM/DD/ for the target batch window.IAM role:
SBW_ETL_HOURLY_RULE
EventBridge drives the batch nature of the platform:
SBW_ETL_HOURLY_RULErate(1 hour)SBW_Lamda_ETLWhenever the rule triggers:
clickstream_dw.We can also trigger the ETL Lambda manually (from the Lambda console) for ad-hoc backfills or testing.
sg_Lambda_ETL:
sg_analytics_ShinyDWH:5432.sg_analytics_ShinyDWH:
5432/tcp from sg_Lambda_ETL.3838/tcp for Shiny (accessible only via SSM port forwarding).