Month: July 2021

AWS CDK Cheat Sheet

Documentation 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 CDK Constructs Library TypeScript API Reference Best Practices github.com/kevinslin/open-cdk Examples github.com/kolomied/awesome-cdk github.com/cloudcomponents/cdk-constructs/tree/master/examples 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 bobbyhadz.com/blog/how-does-aws-cdk-work bobbyhadz.com/blog/cdk-constructs-tutorial bobbyhadz.com/blog/aws-cdk-identifiers bobbyhadz.com/blog/how-to-use-context-aws-cdk bobbyhadz.com/blog/aws-cdk-parameters-example bobbyhadz.com/blog/aws-cdk-vpc-example bobbyhadz.com/blog/aws-cdk-security-group-example Some Gotchas 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 …

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 »

About YAML

Based on: https://www.json2yaml.com/convert-yaml-to-json JSON JSON stands for “javascript object notation” records separated by commas keys & strings wrapped by double quotes good choice for data transport YAML YAML stands for “YAML ain’t markup language” and is a superset of JSON lists begin with a hyphen dependent on whitespace / indentation better suited for configuration than …

About YAML 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 »

screen CheatSheet

~/.screenrc Example screen config file: .screenrc Start a new screen session Start a new screen session with session name List screen sessions Attach a screen session <name> can be the part of the session name (search term) if there is no conflict. If the search term match multiple session names, the attach will fail. Detach …

screen CheatSheet 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