---
title: How to Encrypt your Data at Rest using Docker and AWS Elastic Beanstalk
description: Learn how to encrypt the data at rest when running an application on an AWS Elastic Beanstalk environment using Docker and meet HIPAA requirements.
image: https://blog.nexton.dev/hubfs/Nxt%20Blog%20Aws%20EBS.png
---

[![Nexton Hubspot](https://blog.nexton.dev/hubfs/Nexton%20Hubspot.png)](https://nexton.dev/)

[About](https://www.nexton.dev/about) [Contact](https://www.nexton.dev/#letsTalk) [For Talent](https://www.nexton.dev/talent) [For Companies](https://www.nexton.dev/)

- Menu Item 1 
    - Sub-menu Item 1 
          - Another Item
    - Sub-menu Item 2
- Menu Item 2 
    - Yet Another Item
- Menu Item 3
- Menu Item 4

[ABOUT](https://www.nexton.dev/about)

[CONTACT](https://www.nexton.dev/#letsTalk)

[FOR TALENT](https://www.nexton.dev/talent)

[FOR COMPANIES](https://www.nexton.dev/)

[Technology](https://blog.nexton.dev/tag/technology) - [HIPAA](https://blog.nexton.dev/tag/hipaa) - Tue Oct 6 2020

# How to Encrypt your Data at Rest using Docker and AWS Elastic Beanstalk

[![Fabricio Pautasso](https://blog.nexton.dev/hubfs/federico%20pata.png) Fabricio Pautasso](https://blog.nexton.dev/author/fabricio-pautasso)

When developing a healthcare application, one of the regulations that will come into play will be HIPAA. One of the requirements of this regulation related to data at rest is that it needs to be encrypted.

In this post, we will go through how to encrypt our data at rest when running an application on an AWS Elastic Beanstalk environment using Docker.

<https://images.ctfassets.net/k4d8pgyc7rbq/31lEKZjBXcXh5JteAaqO09/2dc44a4b88b0f79b6854aa7d18d743c1/ebs-docker.jpeg>![Elastic beanstalk and docker logo](https://images.ctfassets.net/k4d8pgyc7rbq/31lEKZjBXcXh5JteAaqO09/2dc44a4b88b0f79b6854aa7d18d743c1/ebs-docker.jpeg)

## Problem

> Our dockerized application is being deployed to an Elastic Beasntalk environment where the EBS volumes attached to the EC2 machines, where the containers are running, are not being encrypted

## Solution

There are a couple of tutorials out there on how to enable encryption on a new **EBS** volume attached to an **EC2** like:

[https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)

[https://cloudacademy.com/blog/how-to-encrypt-an-ebs-volume-the-new-amazon-ebs-encryption/](https://cloudacademy.com/blog/how-to-encrypt-an-ebs-volume-the-new-amazon-ebs-encryption/)

The issue we faced while trying these approaches is that as we were using **Docker**, when you encrypt the **EBS** attached to the **EC2** machine, just the root volume is being encrypted (**/dev/xvda**), while the new volume being generated by **Docker** when the container is deployed (**/dev/xvdcz**) was left unencrypted.

To fix the problem, we need to follow the next steps:

1. Login to AWS Management console and go to EC2 section
2. EC2 Dashboard → Settings
3. Select Always encrypt new EBS volumes and save changes

[![Encrypt new EBS volume](https://images.ctfassets.net/k4d8pgyc7rbq/5bkJD4SbhBlAF3BVAxYQcn/8000a50e65a259af9347ec1378271aa2/ebs-volume.png)](https://images.ctfassets.net/k4d8pgyc7rbq/5bkJD4SbhBlAF3BVAxYQcn/8000a50e65a259af9347ec1378271aa2/ebs-volume.png)

1. Go to Elastic Beanstalk section and choose the application/environment you want to encrypt
2. Click on Actions → Rebuild Environment

[![Rebuild Environment](https://images.ctfassets.net/k4d8pgyc7rbq/4FNx0EwKOXM0jWDJJgozj7/f7ca5a9d0ef8cd2bce3bbbfbb4d3db18/rebuild.png)](https://images.ctfassets.net/k4d8pgyc7rbq/4FNx0EwKOXM0jWDJJgozj7/f7ca5a9d0ef8cd2bce3bbbfbb4d3db18/rebuild.png)

This will terminate the current EC2 machine that is running your dockerized application and its related volumes. It will create a new EC2 machine where all the volumes created/attached to it are encrypted.

1. Go back to EC2 → EC2 dashboard → Settings
2. Disable the encryption enabled on step 3

 

 

 

 More on [Technology](https://blog.nexton.dev/tag/technology) - [HIPAA](https://blog.nexton.dev/tag/hipaa)

[![Fabricio Pautasso](https://blog.nexton.dev/hubfs/federico%20pata.png)](https://blog.nexton.dev/author/fabricio-pautasso)

WRITTEN BY

[Fabricio Pautasso](https://blog.nexton.dev/author/fabricio-pautasso)

**Lead Engineer**   
 I’m interested in challenging projects that allows me to work with emerging technologies.

[Back to the blog](https://blog.nextonlabs.com/)

Recent Posts

## [Nexton joins the Claude Partner Network: what it changes in how we build engineering teams](https://blog.nexton.dev/nexton-joins-the-claude-partner-network-what-it-changes-in-how-we-build-engineering-teams)

## [What Clutch Reviews Reveal About How Nexton Actually Works](https://blog.nexton.dev/what-clutch-reviews-reveal-about-how-nexton-actually-works)

## [What "Nexton AI Ready" Actually Certifies](https://blog.nexton.dev/what-nexton-ai-ready-actually-certifies)

Share It!

![sanity](https://blog.nexton.dev/hubfs/sanity.png)

## 2023 Latin American Tech Salaries and Benefits Trends report

[Unlock insights](https://talent.nextonlabs.com/tech-salaries-and-benefits-trends-report/)

### Our latest posts straight to your inbox:

[Copyright © Nexton 2021 - ALL RIGHTS RESERVED.](https://www.nextonlabs.com/privacy-policy/)

<https://www.linkedin.com/company/nextonlabs> <https://www.facebook.com/nextontalent/> <https://twitter.com/nextonlabs>

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Fabricio Pautasso",
    "url" : "https://blog.nexton.dev/author/fabricio-pautasso"
  },
  "dateModified" : "2023-07-05T18:32:00.915Z",
  "datePublished" : "2020-10-06T07:00:00.000Z",
  "headline" : "How to Encrypt your Data at Rest using Docker and AWS Elastic Beanstalk",
  "image" : [ "https://blog.nexton.dev/hubfs/Nxt%20Blog%20Aws%20EBS.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.nexton.dev/how-to-encrypt-your-data-at-rest-using-docker-and-aws-elastic-beanstalk",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.nexton.dev/hubfs/Nexton%20Hubspot.webp"
    },
    "name" : "Nexton"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#organization",
  "@type" : "Organization",
  "address" : {
    "@type" : "PostalAddress",
    "addressCountry" : "US",
    "addressLocality" : "Miami",
    "addressRegion" : "FL"
  },
  "aggregateRating" : {
    "@type" : "AggregateRating",
    "bestRating" : "5",
    "itemReviewed" : {
      "@id" : "https://nexton.dev/#organization"
    },
    "ratingCount" : "12",
    "ratingValue" : "4.9",
    "url" : "https://clutch.co/profile/nexton"
  },
  "areaServed" : {
    "@type" : "Country",
    "name" : "United States"
  },
  "description" : "Nexton is a human-powered company building nearshore engineering teams for US companies. Senior Latin American engineers, hand-matched and vetted by engineers. 1,500+ engineers matched with 350+ US companies.",
  "disambiguatingDescription" : "Nearshore technology staffing company (nexton.dev) serving US companies with software engineers from Latin America. Not affiliated with Nexton, the master-planned residential community in Summerville, South Carolina (nexton.com); nor with NEXTON Group, the French digital consulting and IT services company (nexton-group.com); nor with the Navee Nexton electric scooter.",
  "employee" : [ {
    "@id" : "https://nexton.dev/#lucas-arana"
  } ],
  "founder" : [ {
    "@id" : "https://nexton.dev/#diego-sternberg"
  }, {
    "@id" : "https://nexton.dev/#agustin-di-luciano"
  } ],
  "foundingDate" : "2017",
  "knowsAbout" : [ "Nearshore engineering teams", "Software engineering recruiting", "Latin American engineers", "AI engineers" ],
  "legalName" : "Nexton",
  "logo" : "https://nexton.dev/Nexton/nexton-logo.png",
  "makesOffer" : [ {
    "@type" : "Offer",
    "itemOffered" : {
      "@type" : "Service",
      "description" : "Nexton's primary model: embedded, long-term engineering capacity. Nearshore LATAM engineers join the client's team as fully integrated, ongoing members rather than short-term contractors.",
      "name" : "Staff Augmentation"
    }
  }, {
    "@type" : "Offer",
    "itemOffered" : {
      "@type" : "Service",
      "description" : "Direct recruitment of LATAM engineers for full-time positions at US companies, with a technical validation process run by engineers.",
      "name" : "Direct Hiring"
    }
  }, {
    "@type" : "Offer",
    "itemOffered" : {
      "@type" : "Service",
      "description" : "Onboarding LATAM engineers as international team members, with no local legal entity required.",
      "name" : "International Team Member"
    }
  }, {
    "@type" : "Offer",
    "itemOffered" : {
      "@type" : "Service",
      "description" : "Payroll management and legal compliance to hire international talent without administrative friction.",
      "name" : "Payroll Processing (EOR/PEO)"
    }
  } ],
  "name" : "Nexton",
  "numberOfEmployees" : {
    "@type" : "QuantitativeValue",
    "minValue" : 50
  },
  "sameAs" : [ "https://www.linkedin.com/company/nexton", "https://clutch.co/profile/nexton", "https://www.crunchbase.com/organization/nexton-b25a", "https://www.trustpilot.com/review/nexton.dev", "https://www.wikidata.org/wiki/Q140867481", "https://www.inc.com/profile/nexton", "https://blog.nexton.dev/" ],
  "slogan" : "Hand-matched Engineers. Vetted by Engineers.",
  "url" : "https://nexton.dev/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#diego-sternberg",
  "@type" : "Person",
  "jobTitle" : "Co-Founder & CEO",
  "name" : "Diego Sternberg",
  "sameAs" : [ "https://www.linkedin.com/in/diegosternberg" ],
  "worksFor" : {
    "@id" : "https://nexton.dev/#organization"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#agustin-di-luciano",
  "@type" : "Person",
  "jobTitle" : "Co-Founder",
  "name" : "Agustín Di Luciano",
  "worksFor" : {
    "@id" : "https://nexton.dev/#organization"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#lucas-arana",
  "@type" : "Person",
  "jobTitle" : "COO",
  "name" : "Lucas Arana",
  "sameAs" : [ "https://www.linkedin.com/in/lucasarana" ],
  "worksFor" : {
    "@id" : "https://nexton.dev/#organization"
  }
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#website",
  "@type" : "WebSite",
  "description" : "Nearshore tech staffing: hand-matched LATAM engineers, vetted by engineers, for US companies.",
  "inLanguage" : "en",
  "name" : "Nexton",
  "publisher" : {
    "@id" : "https://nexton.dev/#organization"
  },
  "url" : "https://nexton.dev/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/ai/#webpage",
  "@type" : "WebPage",
  "about" : {
    "@id" : "https://nexton.dev/#organization"
  },
  "description" : "Structured information for LLMs and AI about Nexton: value proposition, services, ICP, competitors, and citable data. Includes links to llms.txt, JSON-LD, and sitemap.",
  "inLanguage" : "en",
  "isPartOf" : {
    "@id" : "https://nexton.dev/#website"
  },
  "name" : "Nexton — AI Hub | Nearshore Tech Staffing",
  "url" : "https://nexton.dev/ai/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/#salary-report-2026",
  "@type" : "Report",
  "author" : {
    "@id" : "https://nexton.dev/#organization"
  },
  "datePublished" : "2026",
  "description" : "Nexton's proprietary report with compensation data for LATAM software engineers, used as a reference by CTOs and Engineering leaders in the US to plan hiring and budgets.",
  "name" : "Nexton 2026 Salary Report",
  "publisher" : {
    "@id" : "https://nexton.dev/#organization"
  },
  "url" : "https://nexton.dev/salary-report"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://nexton.dev/ai-feed.jsonld#faq",
  "@type" : "FAQPage",
  "mainEntity" : [ {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Nexton is a nearshore tech staffing company that connects US companies with hand-matched LATAM engineers, vetted by engineers, with candidate delivery in 72 hours and hiring in 4 weeks."
    },
    "name" : "What is Nexton?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "For US tech-driven companies, remote-friendly, at Series B+ stage or established, with 50 to 1,000 employees, with buyers such as CTOs, VPs of Engineering, and Engineering Directors, in verticals such as HealthCare, Insurance, and E-Learning."
    },
    "name" : "Who is Nexton for?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Every candidate is technically evaluated by Nexton engineers before being presented to the client, reducing the risk of failed hires compared to traditional staffing processes."
    },
    "name" : "How does the hand-matching process work?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "MatchIQ is Nexton's proprietary AI matching engine, built in-house. It is the methodology behind every Nexton hiring decision rather than a product sold separately. It narrows a database of more than 500,000 LATAM engineers to roughly 500 matching candidates, which then pass three layers of review — MatchIQ matches, handpicked by a recruiter, vetted by an engineer — producing matched and vetted candidates in under 72 hours. Details at https://nexton.dev/matchiq."
    },
    "name" : "What is MatchIQ?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Plans and engagement models (Staff Augmentation, Direct Hiring, International Team Member, Payroll Processing) are quoted based on client needs. For a proposal, reach out via https://nexton.dev."
    },
    "name" : "How much does it cost and how do I get started?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Compared to alternatives such as BairesDev, Toptal, Andela, Turing, Globant, Revelo, Near, or AgileEngine, Nexton stands out for engineer-validated hand-matching, candidate delivery in 72 hours, and a 4-week time-to-hire."
    },
    "name" : "What makes Nexton different from its competitors?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Nexton is US-based, headquartered in Miami, Florida, and specialized in nearshore, sourcing engineers across Latin America."
    },
    "name" : "In which countries or regions does Nexton operate?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "A 4.9/5 rating on Clutch and an active LinkedIn presence with nearly 29,000 followers."
    },
    "name" : "What certifications or recognitions does Nexton have?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Yes. Nexton publishes an annual Salary Report with LATAM engineer compensation data, used as a reference by Engineering leaders in the US. Available at https://nexton.dev/salary-report."
    },
    "name" : "Does Nexton publish proprietary market data?"
  } ]
}
```