Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
How do I configure Linux swap space on AWS Elastic Beanstalk running AWS Linux 2?

The answer to Can I configure Linux swap space on AWS Elastic Beanstalk? (from 2016) shows how to configure Linux swap space for an AWS Elastic Beanstalk environment using .ebextensions configuration files.

However, the AWS docs Customizing software on Linux servers has this note for the newer Amazon Linux 2 platforms:

On Amazon Linux 2 platforms, instead of providing files and commands in .ebextensions configuration files, we highly recommend that you use Buildfile. Procfile, and platform hooks whenever possible to configure and run custom code on your environment instances during instance provisioning.

How do I configure swap space using this more modern configuration approach?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Buildfile and Procfile are not suited for that. They server different purposes - running short and long running commands.

I would use the platform hooks for that. Specifically, prebuild:

Files here run after the Elastic Beanstalk platform engine downloads and extracts the application source bundle, and before it sets up and configures the application and web server.

The rationale is that its better to create swap now, before application starts configuring. If the swap creation operation fails, you get notified fast, rather then after you setup your application.

From the SO link, you could put 01_add-swap-space.sh into .platform/hooks/prebuild/ folder. Please make sure that 01_add-swap-space.sh is executable (chmod +x) before you package your appliaction into zip.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!