The Simplest Way to Make Ec2 Systems Manager and Selenium Work Like They Should
Running ec2 systems manager and selenium together lets teams test web apps on private servers. You can run browser tests without opening inbound network ports to the public web. This pairing helps engineering teams check internal tools and staging sites with less risk. Systems Manager handles host access while Selenium drives the browser to test user actions. Teams get clean test runs and strong network rules at the same time. How ec2 systems manager and selenium share permissions and data F
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Running ec2 systems manager and selenium together lets teams test web apps on private servers. You can run browser tests without opening inbound network ports to the public web.
This pairing helps engineering teams check internal tools and staging sites with less risk. Systems Manager handles host access while Selenium drives the browser to test user actions. Teams get clean test runs and strong network rules at the same time.
How ec2 systems manager and selenium share permissions and data
First, an engineer or build job logs in through the cloud identity service. The cloud checks the user role to see which test hosts they can reach. If the role matches, Systems Manager opens a secure channel to the private instance.
A small agent runs on that cloud instance and listens for work from Systems Manager. The agent takes commands over an outbound link to the cloud service API. You do not need to manage SSH keys or open network ports on the host.
Once the channel is open, the test runner starts the Selenium driver on the host. You can also forward a local port through the tunnel to reach a remote browser grid. Selenium then opens the web browser, clicks buttons, fills forms, and reads page text.
When the test finishes, Selenium writes the pass or fail results and saves screen captures. Systems Manager sends the command output back to the build system or central log store. The test runner closes the browser, and the cloud service ends the host session.
Common failure modes and how to scope roles
Many teams make the mistake of using one shared role for all test nodes. If a test script breaks out of the browser, it gets that full cloud role. An attacker could use a broad role to read cloud storage or change other servers.
Another common risk comes from shared service accounts used by the whole engineering team. When five people use the same login, the logs cannot show who ran a test. Teams also leave test ports open to the whole internal network by mistake.
GCP Access Context Manager + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Long-lived cloud keys on build servers create another big gap for security teams. If someone steals a static key, they can run commands on your test fleet anytime. Unlogged browser commands also make it hard to trace what data a test touched.
To fix this, give each build job and user a small, separate cloud role. Scope the host role so the instance only talks to the Systems Manager service. Use resource tags so a test job can only reach servers marked for browser testing.
Set network rules so the Selenium nodes can only reach the staging web app. Block the test hosts from reaching production databases or other private services on the network. Send every command log and test output to a central log bucket for review.
Managing browser test fleets at scale
Browser tests use a lot of memory and processor power on your cloud hosts. If an old browser process hangs, the next test run on that host may fail. Teams can use Systems Manager automation to restart hung drivers or clean up full disks.
You can also use Systems Manager to install the right browser and driver files. Keeping the browser and driver in sync stops the most common Selenium crashes. When a test run ends, a cleanup script can wipe temporary browser folders right away.
Wiping browser folders removes saved cookies, test tokens, and cached page data from the disk. This step ensures that every new test starts with a clean and fresh browser state. Your team gets reliable test results and keeps private staging data off the host disk.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Do I need open inbound ports to run Selenium through Systems Manager?
No, the host agent uses an outbound connection to talk to the cloud API. You can close all inbound ports in your security groups and still run tests.
How do I stop test scripts from reading sensitive test data in logs?
Set your test runner to turn off verbose command logs when typing secrets. You can also use data masking to rewrite emails, phone numbers, or card numbers in results.
Can I connect a local code editor to a remote Selenium grid this way?
Yes, you can use port forwarding over the Systems Manager tunnel from your laptop. Your local test script talks to a local port that routes to the remote grid.
Related guides
In this post