This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from cgi import parse_header, parse_multipart | |
| from io import BytesIO | |
| import base64 | |
| def selfie(event, context): | |
| body = event['body'] | |
| print(type(body)) | |
| print(body) | |
| content_type, property_dict = parse_header( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cdk = require('@aws-cdk/core'); | |
| import greengrass = require('@aws-cdk/aws-greengrass'); | |
| import lambda = require('@aws-cdk/aws-lambda'); | |
| import { CfnCustomResource } from '@aws-cdk/aws-cloudformation'; | |
| import { PolicyStatement, Role, ServicePrincipal, CompositePrincipal } from '@aws-cdk/aws-iam'; | |
| import { group_deployment_reset_code } from '../lib/code/group_deployment_reset'; | |
| import { thing_vendor_code } from '../lib/code/thing_vendor'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # on ckamaster1 | |
| sudo -i | |
| apt install docker.io kubeadm=1.15.1-00 kubectl=1.15.1-00 kubelet=1.15.1-00 | |
| kubeadm init --config=kubeadm-config.yaml --upload-certs| tee kubeadm-init.out | |
| ## OUTPUT | |
| # kubeadm join ckamaster:6443 --token 4gttsi.cpkvihy9jwb8o8aq \ | |
| # --discovery-token-ca-cert-hash sha256:c70ef81c9dd7064432a255b9f617e8c3c83b4cce64db17e2518c32b0e3aaf460 | |
| exit | |
| mkdir -p $HOME/.kube | |
| sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| STACKSET_NAME="template-us-west-2-shared-services" | |
| STACKSET_REGION="us-west-2" | |
| STACKSET_DEPLOYMENT_REGIONS="us-west-2" | |
| STACKSET_DEPLOYMENT_ACCOUNTS="123456789012" | |
| ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | |
| STACK_STATE=$(aws cloudformation describe-stack-set --stack-set-name "$STACKSET_NAME" --region "$STACKSET_REGION" --query "StackSet.StackSetName" 2>/dev/null) | |
| if [ -z "$STACK_STATE" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Auto start keychain | |
| eval $(/usr/bin/keychain --eval --quiet id_rsa) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Identify reachable hosts | |
| hosts: all | |
| connection: local | |
| gather_facts: false | |
| tasks: | |
| - block: | |
| - name: determine hosts that are reachable | |
| ansible.builtin.wait_for_connection: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python3 -m pip install -U git+https://github.com/aws-greengrass/[email protected] | |
| gdk component build | |
| gdk component publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Component deploy | |
| on: | |
| repository_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: Roles and Resources required to export Amazon WorkMail content programmatically | |
| Resources: | |
| WorkMailExportBucket: | |
| Type: AWS::S3::Bucket | |
| WorkMailExportBucketKey: | |
| Type: AWS::KMS::Key | |
| DeletionPolicy: Retain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: OIDC Example action | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| example: |