Skip to content

Instantly share code, notes, and snippets.

View rhosys-service-account's full-sized avatar
🔐
It's security related

Rhosys Service Account rhosys-service-account

🔐
It's security related
View GitHub Profile
@wparad
wparad / findDanglingElasticIpAddresses.js
Last active October 3, 2021 17:32
Find Route53 records pointing to unowned IP Addresses
// This is also a config rule: https://eu-west-2.console.aws.amazon.com/lambda/home?region=eu-west-2#/create/app?applicationId=arn:aws:serverlessrepo:eu-west-1:922723803004:applications/Elastic-IP-Config-Rule
const { Route53, EC2, config } = require('aws-sdk');
config.region = 'eu-west-1';
async function findDanglingElasticIpAddresses(dryRun = true) {
const route53 = new Route53();
let hostedZoneIds;
try {
console.log('Looking up hosted zones:');
@rhosys-service-account
rhosys-service-account / cloud-formation.js
Last active November 21, 2020 10:35
Step Function execution example including error handling
/** Example used to support creating custom domains with https://authress.io */
const stepFunctionResource = {
"Type": "AWS::StepFunctions::StateMachine",
"Properties": {
"StateMachineName": {
"Fn::Sub": "${AWS::StackName}-CustomDomain"
},
"LoggingConfiguration": {
"Destinations": [{
"CloudWatchLogsLogGroup": {