Contact us

AWS: creating AMIs from EBS snapshots shared with you

August 15, 2022 – Samuli Seppänen

In AWS EBS ("Elastic Block Storage") is the underlying technology that (virtual) hard disks of your instances (virtual machines) use. You can take snapshots of those virtual hard disks and use those snapshots to, for example:

  • Debugging issues with unbootable virtual machines: attach and then mount the snapshot on another virtual machine and investigate what is wrong.
  • Creating AMI images from which you can launch new instances
  • Sharing EBS volumes (between regions and AWS accounts), e.g. for purposes of migrating VMs

Here we'll focus on the last use-case: being able to create copies of virtual machines on another AWS account. The reason why I even bothered writing this blog post is that most of the articles on the Internet do not cover this use-case: they assume you're working within one AWS account and/or one region. The use-case covered here requires a few extra steps:

  1. In the origin AWS account take a snapshot of the virtual machine's EBS volume
  2. In the origin AWS account (If needed) copy the EBS snapshot to the region where it will be deployed on on the other AWS account
  3. In the origin AWS account configure snapshot permissions to grant access to the target AWS account
  4. In the target AWS account create a snapshot from the snapshot that was shared with you (creating an AMI directly from a snapshot shared with you does not work)
  5. In the target AWS account create an AMI from the snapshot that was created from the EBS volume
  6. In the target AWS account launch a new instance (virtual machine) from the AMI you just created

Why the process needs this extra step (snapshot -> snapshot) I do not know. Possibly it has something to do with how the snapshot permissions/sharing works.

Did you like the article? Share it with others!
Categories

Tags

#aad #Access #acl #alertmanager #ansible #ansible module development #Apache #API #augeas #authentication #authorization #automation #automatization #aws #azure #backup #bash #bitbucket #buildbot #cache #centos #cloud #cloud-init #cloudflare #cloudfront #cluster #connectionsJpa #control repo #custom fact #database #debian #devops #digital sovereignty #DNS #docker #domain mode #duplo #edenred #ejabberd #email #encryption #erb #europe #eyaml #fabric #facter #facts #fargate #fedora #file #finnish #foreman #freeipa #git #github #gitlab #gnome #google #grafana #hammer #hiera #IAM #import #infinispan #Infrastructure as Code #ipmi #irc #jboss #jdk #jenkins #JMESPath #json #kanban #keycloak #letsencrypt #librarian-puppet #librenms #linkedin #Linux #Location #loop #marketing #mautic #Mellon #mfa #microsoft #monitoring #mysql #nagios #network-manager #oauth #oauth2 #office365 #oidc #openshift #open source #openvpn #oxygen #packer #paranormal #pdk #people #php #pkcs7 #pomodoro #Powershell #preseed #presentation #profiles #prometheus #provisioning #puppet #puppet-bolt #puppet-litmus #puppetboard #puppetdb #Puppetfile #puppetserver #puppet types and providers #pxeboot #qemu #quality #r10k #recruitment #redirect #Restrict #Reverse Proxy #robotframework #roles #rspec #ruby #SAML #sem #shell #showsql #snmp #snmpd #software developement #spam #ssh #sso #standardization #systemd #systemd-resolved #teams #terraform #twilio #ubuntu #user-data #vagrant #vanity awards #variable #vim #virtualbox #visualstudio #webdevelopment #wildfly #Windows #wireguard #wordpress #workflow #x11 #xmpp #zimbra
We are
 Puppeteers
menucross-circle