Skip to content

Instantly share code, notes, and snippets.

View cfbarbero's full-sized avatar

Cris Barbero cfbarbero

View GitHub Profile
@noamsdahan
noamsdahan / passrole_actions_and_parameters.csv
Last active April 19, 2024 05:54
A list of IAM actions which require iam:PassRole as of December 2020. Nested parameters are written with dot ('.') notation. Where there are multiple relevant parameters, they are separated by the pipe character ('|'). consult the AWS documentation on special cases - noted with an asterisk (most of them are "array of documents" type parameters).…
IAM Permission Params
amplify:CreateApp iamServiceRoleArn
amplify:UpdateApp iamServiceRoleArn
appconfig:CreateConfigurationProfile RetrievalRoleArn
appconfig:UpdateConfigurationProfile RetrievalRoleArn
appflow:CreateConnectorProfile connectorProfileConfig.connectorProfileProperties.Redshift.roleArn
appflow:UpdateConnectorProfile connectorProfileConfig.connectorProfileProperties.Redshift.roleArn
application-autoscaling:RegisterScalableTarget RoleARN
apprunner:CreateService SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn
apprunner:UpdateService SourceConfiguration.AuthenticationConfiguration.AccessRoleArn|InstanceConfiguration.InstanceRoleArn
@cfbarbero
cfbarbero / aws cli queries.md
Last active July 20, 2022 03:56
AWS CLI query examples

search sns subscriptions by endpoint

aws sns list-subscriptions --query 'Subscriptions[?contains(Endpoint,`dev`) == \`true\` ][Endpoint, TopicArn]' --output table

search alarms by sns topic

aws cloudwatch describe-alarms --query 'MetricAlarms[?contains(AlarmActions, `something`) == `true`][AlarmName, AlarmActions]' --output table --max-items 10

Get stack outputs

aws cloudformation describe-stacks --query 'Stacks[0].Outputs' --output table --stack-name $stackname --profile $profile

Get stack outputs from multiple stacks

@crissupb
crissupb / build.sh
Created March 12, 2018 22:03
Script to rebuild Git2S3 Lambda zip file
yum update
yum upgrade
yum install -y gcc make cmake git zip
yum install -y python27-devel python27-pip make cmake
yum install -y libcurl-devel wget zlib-devel openssl-static libffi-devel
wget https://www.libssh2.org/download/libssh2-1.8.0.tar.gz
tar xvf libssh2-1.8.0.tar.gz
cd libssh2-1.8.0
@davidfowl
davidfowl / dotnetlayout.md
Last active May 6, 2025 09:59
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 7, 2025 20:00
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'