AWS EC2 Instance Connect logo

AWS EC2 Instance Connect

AWS EC2 Instance Connect

UpOpen Sourcecloudby Amazon Web Services62· JavaScript· MIT

AWS EC2 Instance Connect API temporarily pushes SSH public keys to EC2 instance authorized_keys — SSH access without long-lived keys.

Visit site ↗Source ↗Health checked 9h ago
Use it when

No-key-management security mode

Watch for

Default support only for Amazon Linux 2 / Ubuntu 16.04+; other OS needs agent installation

First check

aws ec2-instance-connect send-ssh-public-key --instance-id ... pushes the public key; ssh ec2-user@... within 60 seconds to log in.

Auth
CORS
No
HTTPS
Yes
Signup
?
Latency
13 ms
Protocol
REST
Pricing
Stars
62

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 13ms

GitHub activity

62JavaScriptMIT17 open issuesLast commit 110d ago
01

About this API

EC2 Instance Connect addresses a traditional EC2 pain point: SSH key management. Traditional flow: configure a keypair at EC2 launch, download .pem to local — but .pem is a long-lived credential; leak means trouble. Sharing .pem among ops teams creates audit issues. Instance Connect takes a different approach: when you need SSH, temporarily push your public key to the target instance's authorized_keys (auto-expires in 60s), with IAM controlling who can push to which instance. CloudTrail logs every push for clean audits. Client just needs EC2 Instance Connect CLI or AWS Console's web SSH. Works for in-region SSH access; not cross-region or public-internet SSH (VPC-only). Systems Manager Session Manager is a more comprehensive alternative (no SSH port needed), but Instance Connect suits "want to keep SSH protocol experience" scenarios.

02

What you can build

  • 1SSH into EC2 without pre-configured keypair at launch
  • 2Temporary SSH access for debugging, then revoke
  • 3Audit SSH access (CloudTrail records who pushed keys)
  • 4Avoid managing ec2-user.pem long-lived keys
03

Strengths & limitations

Strengths

  • No-key-management security mode
  • Pushed keys auto-expire in 60 seconds
  • Full CloudTrail audit
  • Integrates with IAM for SSH access control

Limitations

  • Default support only for Amazon Linux 2 / Ubuntu 16.04+; other OS needs agent installation
  • Does not fully replace Systems Manager Session Manager (more comprehensive)
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://github.com/mermade/aws2openapi/<endpoint>
05

Getting started

aws ec2-instance-connect send-ssh-public-key --instance-id ... pushes the public key; ssh ec2-user@... within 60 seconds to log in.

06

FAQ

Instance Connect vs. Session Manager?+

Session Manager: no SSH port + more comprehensive (session logs, port forwarding). Instance Connect: preserves SSH experience but needs port 22 open.

07

Technical details

CORS: NoHTTPS: YesSignup: ?Open source: Yes
Auth type
unknown
Pricing
unknown
Protocols
REST
SDKs
python, javascript, go, java
Response time
13 ms
Last health check
5/12/2026, 7:36:33 AM
08

Tags

09

More from Amazon Web Services