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
# Set project and credentials to use for PoC, plus resource names | |
export CLOUDSDK_CORE_ACCOUNT=<user account address> | |
export CLOUDSDK_CORE_PROJECT=<project name> | |
export BUCKET_NAME=manual-iam-test-$(date --iso-8601) | |
export SERVICE_ACCOUNT=manual-gcs-test | |
# Create Service account and download json key | |
gcloud beta iam service-accounts create ${SERVICE_ACCOUNT} --display-name "Manual GCS Test" | |
gcloud beta iam service-accounts keys create ${SERVICE_ACCOUNT}.json --iam-account ${SERVICE_ACCOUNT}@${CLOUDSDK_CORE_PROJECT}.iam.gserviceaccount.com |
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 google.oauth2.service_account | |
import google.auth.transport.requests | |
import json | |
image = 'gcr.io/<project>/<image>' | |
digest = '<tag or digest>' | |
credentials = google.oauth2.service_account.Credentials.from_service_account_file( | |
'<path/to/service/account/json>', | |
scopes=[ |
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 os | |
import tempfile | |
import yaml | |
import google.cloud.container_v1 | |
import google.protobuf.json_format | |
import kubernetes.client | |
import kubernetes.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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": ["s3:Get*"], | |
"Resource": ["arn:aws:s3:::my-bucket-name/allowed/prefix/*"], | |
"Effect": "Allow" | |
}, | |
{ | |
"Action": ["s3:ListBucket"], |
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
// ==UserScript== | |
// @name AWS Console Lambda viewport | |
// @namespace https://binarypa.in/tampermonkey/aws | |
// @version 0.2 | |
// @description Removing the hard-coded height for functions list in AWS console Lambda view | |
// @author tm.aws.lambda.list@binarypa.in | |
// @match https://*.console.aws.amazon.com/lambda* | |
// @grant none | |
// ==/UserScript== |