AWS - noi-techpark/documentation GitHub Wiki

Amazon Web Services

This is just a getting-started guide to use AWS for our projects.

Types of instances

For example:

  • t2 with reduced CPU cycles on demand
  • m4 one CPU full access (costs more)

Elastic Beanstalk

Simple miniservice to provide standard-images. Configuration layer over EC2 for instances, S3 for storage, etc. (uses general AWS services).

NB: Do not shut it down via EC2 instances, because it would be setup by EB instantly. Must be configured via Elastic Beanstalk inside the web-frontend of AWS.

New instances contain the default standard-image again, volumes are destroyed and reset. Other instances on AWS have a persistent volume/disk, that contains all things that you stored on it.

Down or upgrade an instance

Choose a instance, ex. Jenkins Instance state / STOP (not terminate, which means destroy) Instance settings - change instance type Instance state / START Now with same volume, because we configured it to have a persistent disk.

Use volumes/disks

Volumes/disks are fixed and can be changed from one instances to another see -> Elastic Block Store / Volumes: Detach/attach volume

Problems:

  • No linux images from marketplace allowed to change volumes (except you create an AMI / Amazon Machine Image out of your marketplace image / use HAV or HVM virtualization type / rest default **)
  • If mounted through UUID, the old and new volume have the same UUID (for recovery), use /dev for one and UUID for the other
  • Check volumes if not attached, cost but are not used

** Now we can launch it by creating an instance out of the AMI Eventually change associate/disassociate Elastic IPs if you wanna switch from an old instance to a new one

Automated chronjobs for backups

  • See Cloudwatch / Rules inside the AWS console webapp
  • Usually through AWS lambda, but also predefined jobs exist.

Recovery of Virtual Machines

  • Create snapshot with cloudwatch
  • Create an AMI from the snapshot
  • New instance out of that AMI