Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

Script template

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

Script template Strict mode. log and die. Lock. Temp and cleanup.
Script template · Download PNG
Read card text

What this card says

Why do we need it?

Strict mode.

set -Eeuo pipefail

What is it?

log and die.

die(){ log ERROR "$*"; exit 1; }

How to do it

Lock.

exec 9>/tmp/x.lock; flock -n 9

Example

Temp and cleanup.

trap 'rm -rf "$tmp"' EXIT

See all AWS revision cards