Giter Site home page Giter Site logo

aws-eb-gdal-example's Introduction

aws-eb-gdal-example

A way to setup Geodjango for Django 3.2.5 and MySQL 5.7 on Amazon Linux AMI (EC2).

License: MIT

Table of Contents

  1. Setup Elasticbeanstalk with an EC2 key pair for SSH permssions
  2. Setup an S3 bucket correctly
  3. Build GDAL and push it to S3
  4. Loading and running in ElasticBeanstalk

Setup Elasticbeanstalk

When you create an Eb environment, make sure to se the EC2 keypair (Configure -> Security -> Virtual Machine Key Pair) and note the IAM instance profile that you select. This IAM instance will be used in the next step.

Setup S3

Create (or reuse) an S3 bucket (eg: s3-bucket-name) and folder (eg: path/to/empty/folder) to hold the built GDAL libraries. Configure the Bucket Policy permissions so that your IAM role can do PUT actions to that folder:

  {
      "Principal": {
          "AWS": "__Full ARN of the above IAM role__"
      },
      "Action": [
          "s3:PutObject",
          "s3:PutObjectAcl"
      ],
      "Resource": "arn:aws:s3:::__s3-bucket-name/path/to/empty/folder__/*"
  }

Building GDAL

SSH into EC2 machine and build gdal by copy-pasta the gdal-build-script.sh. The script uses s3 cp to transfer the builds onto the S3 above.

Running in EB

Finally, .ebextension scripts will pull the libs from S3 and simply run them. Use the example implementation in .ebextensions/ folder here.

aws-eb-gdal-example's People

Contributors

speedy250 avatar unknownplatypus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.