Skip to content
zefıly

Connect an AWS EC2 instance to Zefily

Zefily talks to EC2 with an IAM access key. AWS offers no server without a key, so the SSH key goes in the create step too. Use a dedicated IAM user with only the permissions Zefily needs, not the root account.

Before you start

  • An AWS account where you can create an IAM user and access keys.
  • A Zefily account that can manage servers and integrations in the organization.
  • Your SSH public key on your computer.

Steps

  1. 1. Create an IAM user for Zefily

    In the AWS console open IAM and create a user for Zefily. Attach only the EC2 permissions the panel needs to create, start, stop, snapshot and terminate instances. Do not use the root account.

  2. 2. Create an access key for the user

    Open the user, choose the Security credentials tab and, in the Access keys section, choose Create access key. AWS asks you to review alternatives first; if you still need the key, choose Other and then Next.

  3. 3. Copy both parts of the key

    Copy the access key ID and the secret access key. AWS shows the secret access key only at creation. If you lose it, delete the key and create a new one. A user can have two keys at most.

  4. 4. Add the key to Zefily

    In Zefily open Settings, then Cloud providers. Choose AWS EC2 and enter the key as ACCESS_KEY_ID:SECRET_ACCESS_KEY, with one colon between the two parts and no spaces.

  5. 5. Add your SSH key

    Open Settings, then SSH keys, and add the public key you sign in with. AWS needs a key for every instance, so tick it in the create form.

  6. 6. Create the instance or import one

    Choose Servers, then Add server, pick the AWS EC2 account, then the region, size and system, and click Create server. To use an instance that already runs, choose Import an existing one and pick it.

  7. 7. Wait for the agent

    The agent installs on the first boot, and the server shows Online in about two minutes. Check the pre-flight result on the server overview.

Verify it works

The server page shows Online with no pre-flight blockers. Sign in with ssh root@your-server-address using your key, or the user the server page names. The EC2 console lists the instance with the name you gave it.

Troubleshooting

The key is rejected
Check the format: ACCESS_KEY_ID and SECRET_ACCESS_KEY joined by one colon, with no spaces or line breaks. A key that was deleted in IAM is rejected at once.
Creating an instance fails with access denied
The IAM user lacks an EC2 permission the panel needs. Add it to the user's policy and try again.
The old key still works after rotation
Two keys can exist for a user. Connect the new key in Settings, then cloud providers, and delete the old key in IAM once it is no longer used.

Questions

Why not use the root account keys?

AWS advises against root access keys. A dedicated IAM user with only the EC2 permissions limits the damage if the key leaks.

Where is the secret access key kept?

In Zefily it is encrypted with your organization key and never shown again after you save it.

Can I import an instance I already run?

Yes. Choose Servers, then Add server, then Import an existing one, and pick the instance. Then use the server page to install the agent if it is not installed.

Read next

Start on a server you own

Create your account, connect a server and follow the guide. The server stays yours: you pay your provider.

Start free

Black Friday & Cyber Monday

Before you go: lifetime plans are on sale

Pay once for a lifetime plan, or get 30% off the first year of any yearly plan.

Only 100 lifetime plans per plan. When they are gone, they are gone.

See the campaign

Amazing November

See the campaign →