DevOps/SysAdmin

AWS CDK Cheat Sheet

https://docs.aws.amazon.com/cdk/latest/guide/stack_how_to_create_multiple_stacks.html https://docs.aws.amazon.com/cdk/latest/guide/get_context_var.html https://docs.aws.amazon.com/cdk/latest/guide/testing.html https://bobbyhadz.com/blog/how-does-aws-cdk-work https://bobbyhadz.com/blog/cdk-constructs-tutorial https://bobbyhadz.com/blog/aws-cdk-identifiers https://bobbyhadz.com/blog/how-to-use-context-aws-cdk https://bobbyhadz.com/blog/aws-cdk-parameters-example https://bobbyhadz.com/blog/aws-cdk-vpc-example https://bobbyhadz.com/blog/aws-cdk-security-group-example CDK Constructs Library TypeScript API Reference github.com/aws-samples/aws-cdk-examples github.com/blndspt/aws-full-stack-template github.com/awslabs/aws-full-stack-template github.com/aws-samples/aws-bookstore-demo-app https://docs.aws.amazon.com/cdk/latest/guide/troubleshooting.html#troubleshooting_app_required When synthesizing an AWS CDK stack, I get the message –app is required either in command-line, in cdk.json or in ~/.cdk.json This message usually means that you aren’t in the main directory of your AWS …

AWS CDK Cheat Sheet Read More »

Downloading Files using Google Drive API

See: Google Cloud SDK (gcloud CLI) Create project in https://console.cloud.google.com Enable Google Drive API in console https://developers.google.com/drive/api/v3/enable-drive-api Using gcloud cli: gcloud doesn’t provide command to access google drive. Install gdrive https://github.com/prasmussen/gdrive After entering verification code from browser: -q, –query <query> https://developers.google.com/drive/api/v3/search-shareddriveshttps://developers.google.com/drive/api/v3/ref-search-terms#operators –order <sortOrder> OrderBy sets the optional parameter “orderBy”: A comma-separated list of sort keys. …

Downloading Files using Google Drive API Read More »

Google Cloud SDK (gcloud CLI)

Installation options Home Brew: https://formulae.brew.sh/cask/google-cloud-sdk Official: https://cloud.google.com/sdk/docs/install gcloud CLI gcloud init – initialize or reinitialize gcloud See: https://cloud.google.com/sdk/docs/initializing gcloud auth – manage credentials  gcloud auth login – authorize gcloud to access Google Cloud Platform with Google user credentials gcloud auth list – lists credentialed accounts gcloud auth activate-service-account – authorize access to Google Cloud Platform …

Google Cloud SDK (gcloud CLI) Read More »

AWS Cloud Development Kit (CDK) – Big Picture

Big Picture Infrastructure as code in TypeScript and Python etc. CDK includes Command line interface (CLI) tool Language bindings to CloudFormation resources Construct Library A Construct is a logical grouping of one or more resources Constructs are reusable cloud components Types of CDK Constructs CFN Resources or L1 Construct (or L1, short for “level 1”) or …

AWS Cloud Development Kit (CDK) – Big Picture Read More »

AWS CLI CheatSheet

Install aws-cli on macOS Based on: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-mac.html Configure default profile AWS Access Key ID AWS Secret Access Key Default region name Default output format Configure a specific profile List default profile information List all profile names Get Access Key ID List all profiles credentials Changing default profile https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/aws-cli/bash-linux

Working with Slack Bot

See: Basic Slack app setup See Your Created Apps to get bot token Initial Setup Get Channel Info A conversation object contains information about a channel-like thing in Slack. It might be a public channel, a private channel, a direct message, or a multi-person direct message. See: https://api.slack.com/types/conversation Need to add some permission to list …

Working with Slack Bot Read More »

Github Actions

Summary GitHub Actions uses YAML syntax to define the events, jobs, and steps. These YAML files are stored in your code repository, in a directory called .github/workflows. GitHub events (e.g. push, pull request) occur, at a scheduled time, manually, or when events outside of GitHub occur. The .github/workflows directory in your repository is searched for workflow files …

Github Actions Read More »