Cheat Sheets
Redshift
- How to determine the creation time of a table in redshift database
- How to change the owner of a Redshift database
- How to Rename Redshift database
- How to Create Database in Redshift Cluster
- How to change Owner of a Schema in Redshift database
- How to change the connection limit of a Redshift database
- How to Rename a Schema in Redshift database
- How to change Quota allocated to a Schema in Redshift database
- How to find the size of a Redshift database
- How to find the size of a schema in Redshift
- How to find the size of a table in Redshift
- How to cancel a running query in Redshift
- How to copy data from a file in S3 bucket to Redshift tables
- How to drop a materialized view in Redshift database
- How to insert data into Redshift tables.
- How to create and refresh a Materialized view in Redshift
- How to create a view in Redshift database
- How to vacuum a table in Redshift database
- How to drop a group in Redshift database
- How to remove a user from a group in Redshift database
- How to rename a group in Redshift database
- How to drop a user in Redshift
- How to change password of a user in Redshift database
- How to Rename a user in Redshift database
- How to rename column in Redshift database
- How to rename a table in Redshift
- How to create a table in Redshift database
- How to change column data type in Redshift
- How to add column to a table in Redshift
- How to create a group and add users to group in Redshift
- How to change the table owner of a Redshift table
- How to add Sort and Dist Keys to an existing Redshift table
- How to kill sessions in Redshift
- Data Types supported by Redshift database
- Alter table commands for Redshift
- How to Create user in Redshift database
- How to unload and copy data in Redshift
- How to disable a Redshift database user
- How to grant super user privileges to a Redshift database user
- How to Revoke super user privileges from a Redshift database user
- How to query only the top 10 rows in Redshift
- How to determine the dist style of a table in Redshift database
- How to change the dist style of a table in Redshift database
- How to Rename a Procedure in Redshift database
- How to change owner of a Procedure in Redshift database
- How to resolve ‘ALTER TABLE ALTER COLUMN cannot run inside a transaction block’ in Redshift
- How to view the sql history(recent queries) of a user in Redshift
- How to add multiple columns to a table in Redshift
- How to get the ddl of a view in Redshift database
- How to list all objects that are dependent on a table in Redshift
- How to get yesterday’s date in Redshift database
- How to get current date, day, month, year in Redshift database
- How to list all the users of a group in Redshift database
- How to drop a table in Redshift database
- How to drop a database from redshift cluster
- How to list all database users in Redshift
- How to identify users with superuser access in Redshift database
- How to get current timestamp in Redshift database
- How to get day of week in Redshift database
- How to get the current user from Redshift database
- How to list all the tables of a schema in Redshift
- How to identify columns that have default values in Redshift
- How to get the row count of all tables in Redshift
- How to get the column count of all tables in Redshift
- How to get all the currently running queries in Redshift
- How to get the column names of a table in Redshift
- How to list all the databases in a Redshift cluster
- How to determine the version of Redshift database
- How to view all active sessions in Redshift database
- How to get the name of the database in Redshift
- How to list all tables and views in Redshift
- How to list Materialized views, enable auto refresh, check if stale in Redshift database
- How to get the ddl of a table in Redshift database
- How to get the ddl of an external table in Redshift database
- How to connect to redshift database from Command Line using psql
- How to List all user defined schemas of a Redshift database
- How to list all external Schemas in Redshift database
- How to drop a column from a table in Redshift database
- How to move table from one schema to another in Redshift
- How to Change owner of all tables in a Schema in Redshift database
- How to change Sort key of a table in Redshift database
- How to add not null constraint to a column in Redshift
- How to resize a column in Redshift database
- How to drop a constraint in Redshift database
- How to Refresh a Materialized View in Redshift
S3
- S3 Cheat Sheet
- S3 CLI Commands
- S3 Concepts – Buckets
- How to create an S3 bucket from AWS CLI
- How to allow public access to a folder in S3 bucket
- How to make an entire S3 bucket public
- How to rename folders and files in S3
- How to list all S3 buckets and contents of a bucket
- How to copy files from one S3 bucket to another using wildcard
- How to delete folder from an S3 bucket
- How to search for files in S3 bucket folder using wildcard
- How to keep the folder and delete all contents of an S3 bucket prefix
- How to Rename an S3 bucket
- How to copy contents from one S3 bucket to another
- How to view the region of an S3 bucket
- How to download an entire S3 bucket
- How to print only file names from an S3 bucket
- How to determine the size of an S3 bucket
- How to download multiple files from an S3 bucket
- How to count Objects in an S3 bucket
- How to create a CloudFront distribution for your S3 website
- How to generate pre-signed url to securely share S3 objects.
- How to access S3 from EC2 Instance using IAM role
- How to perform multi-part upload to S3 using CLI
- How to host a static website using Amazon S3
- How to create an S3 bucket
- How to determine the number of objects in an s3 bucket
- How to delete an S3 bucket
EC2
- How to get the Instance ID of an EC2 Instance from within the Instance
- How to enable detailed monitoring on an EC2 Instance from AWS CLI
- How to cancel a spot instance request from AWS CLI
- How to modify “Delete on Termination” attribute of an EC2 Instance from AWS CLI
- How to enable enhanced networking on an EC2 Instance from AWS CLI
- How to list all running EC2 spot instances
- How to create an AMI of an EC2 Instance from AWS CLI
- How to change EC2 Instance type from AWS CLI
- How to Stop, Start, Reboot, Terminate EC2 Instances from AWS CLI
- How to change EC2 Instance to an ENA supported Instance type
- How to Reboot an EC2 Instance
- How to Delete/Terminate an EC2 Instance
- How to disable Termination Protection on an EC2 Instance
- How to Start an EC2 Instance
- How to Stop an EC2 Instance
- How to enable Termination Protection on an EC2 Instance
- How to enable ENA on an EC2 Instance
- Private IP vs Public IP vs Elastic IP – What is the Difference ?
- How to allocate a new Elastic IP and associate it to an EC2 Instance
- How to move EBS volume to a different EC2 Instance across availability zones
- How to move EBS volume to a different EC2 Instance within the same availability zone
- How to create and attach EBS volume to Linux EC2 Instance
- How to change EC2 Instance type
- How to launch an EC2 Instance
- How to SSH into Linux EC2 instance from a Windows machine
- How to create AMI of an EC2 Instance
EBS
- EBS Cheat Sheet
- How to encrypt an EBS volume
- How to check if an EBS volume is encrypted
- How to change EBS volume type
- How to delete snapshot of an EBS volume
- How to create snapshot of an EBS Volume
- How to create an EBS volume
- How to create copy of an EBS volume snapshot
- How to encrypt the snapshot of an EBS volume
- How to delete unused EBS volumes from AWS CLI to save on cost
- Delete an EBS Volume from AWS CLI
- How to delete unused EBS Volumes from AWS Management Console
- How to resize EBS volume
RDS
SQS
- How to send message to SQS queue from AWS CLI
- How to send a message to an SQS queue
- How to purge an SQS queue from AWS CLI
- How to purge messages from an SQS queue from AWS Management Console
- How to configure a dead-letter queue for an existing SQS queue
- How to create an SQS queue from AWS Console
- How to delete an SQS queue from AWS Management console
- How to delete an SQS queue from AWS CLI
- How to create an SQS queue from AWS CLI
- AWS SQS Cheat Sheet
Lambda
- How to send a message to an SQS queue using Lambda when a file is uploaded to an S3 bucket
- AWS Lambda Cheat Sheet
IAM
- IAM – Users, Groups, Roles, Policies
- How to create an IAM role and attach it to the EC2 Instance
- How to create an IAM Group
- How to create an IAM User
- How to identify groups that an IAM user belongs to
- How to list all IAM users of an AWS account
- How to list all users of an IAM group
- How to enable and disable programmatic access to an IAM user
- How to List, Create and Delete aliases for your AWS account
- How to Change the password of an IAM user
- How to disable AWS Management Console access for IAM user
- How to check if an IAM user has a login profile(password)
- How to rename an IAM user
- How to add user to an IAM group
- How to attach policy to an IAM user
- How to view the contents of an IAM policy
- How to attach policy to an IAM group
- How to view all the policies attached to an IAM group
- How to list all the IAM groups of your AWS account
- How to remove an IAM user from a group
- How to detach a policy from an IAM user
- How to delete an inline policy of an IAM user
- How to delete an IAM user
- How to list all roles in your AWS account
- How to get information about an IAM role
- How to deactivate the MFA device of an IAM user