AWS EC2

Step by step guide to automate Amazon EC2 server and volume snapshots on a custom schedule, daily, hourly, weekly, etc.

Create your AWS credentials

In order for SimpleBackups to manage your Amazon EC2 Snapshots, a IAM Users to be created with the right policies.

We will create a custom policy first to allow us to manage your Amazon EC2 Snapshots. The policy will include the least required permissions to manage snapshots.

Create a custom EC2 policy for snapshots

  • Connect to your AWS Console
  • Click on "Create policy"
  • Click on JSON and paste the custom policy below:
Notion image
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "SimpleBackupsEc2Snapshots",
      "Effect": "Allow",
      "Action": [
        "ec2:CreateImage",
        "ec2:CreateSnapshot",
        "ec2:CreateSnapshots",
        "ec2:CreateTags",
        "ec2:DescribeInstances",
        "ec2:DescribeSnapshots",
        "ec2:DescribeVolumes",
        "ec2:DescribeImages",
        "ec2:DeregisterImage",
        "ec2:DeleteSnapshot"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}
  • Give the policy a name, "Ec2SnapshotsPolicy" then click on "Create policy"
    • Notion image

Create a EC2 user for snapshots

  • Click on "Add users"

In the "Add user" form fill in information shown below:

Step 1: Set user access

  • Define a name to your user, let’s say Ec2SnapshotsUser.
    • Notion image
 

Step 2: Attach policy to user

  • Select "Attach policies directly" and select "Ec2SnapshotsPolicy" (we created in the earlier step).
    • Notion image

Step 3: Finalize user creation

  • Review and create the user.
    • Notion image
 

Step 4: View user and create credentials

  • After the user is created, click on “View user” or just search for the user and choose it.
Notion image
 
  • Click on Security credentials then Create access key
    • Notion image
 
  • Choose “Application running outside AWS” then Next
    • Notion image
 
  • Finally, click Create access key and grab your access and secret keys
Notion image
 

Connect your AWS Account to SimpleBackups

We now have everything we need to connect your AWS account to SimpleBackups.

  • Connect to your SimpleBackups account
  • Click on "Connect a new provider"

In the "Select your provider" form, fill in the information below:

  • Provider: Select AWS EC2
  • Name: Internal name. It doesn't necessarily have to match your AWS IAM User Name
  • Enter the "Access Key" and "Secret" generated in the previous step
  • Region: this is where your resources are created. If you use multiple regions, repeat the same steps with the other region
  • Save
    • Notion image
 

If saving this provider returns an error, make sure to validate that the IAM User associated to the Access Key you used has the right privileges.

 
Did this answer your question?
😞
😐
🤩

Last updated on June 5, 2023