Use a private key to access an EC2 instance on AWS with SSH
The -i modifier allows us to use private keys in our machine. Here we assume the file (key) bastion-key.pem is in the same folder as the…
Create an S3 policy where it can only be accessed from a single IP address
This achieves the same thing as a normal GetObject except the bucket will only be reachable through a certain IP. Ideal for some staging…
Use a private key to tunnel into an EC2 instance on AWS with SSH
Tunneling into some instance allows us to use command locally and have its effect on the remote machine. For example, we have a database…
Find a file or pattern recursively from the current directory
With this command we can search from the terminal easily
Invalidate cloudfront distribution
No matter what we cache with cloudfront, if we update the source we must invalidate our cache. This little command just does that with the…
Make a curl request with the given http verb
The -X modifier allows us to use use other http verbs than GET . Example: This just changes the http verb to POST in this case.