Skip to content

Instantly share code, notes, and snippets.

View ssheff's full-sized avatar
🎯
Focusing

Sergiy Shevchenko ssheff

🎯
Focusing
  • AWS
  • Boston
View GitHub Profile
@ssheff
ssheff / Readme.md
Created November 17, 2023 19:17 — forked from allamand/Readme.md
Copy Docker Images to ECR
lambda function
----
exports.handler = async (event) => {
console.log(event)
const customerId = event.pathParameters.customerId;
const customer = {'customerId': customerId, 'customerName': "Customer " + customerId };
const response = {
statusCode: 200,
// Uncomment below to enable CORS requests
headers: {
@ssheff
ssheff / usingCodeCommitAWS.md
Created September 20, 2023 13:35 — forked from JohannMG/usingCodeCommitAWS.md
Setting Up AWS CodeCommit (Mac) with Sourcetree and disabling keychain

#Setting Up AWS CodeCommit (Mac)

For all possibilities, amazon has guides here: http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up.html

We chose to use HTTPS here

If git asks you to manually enter username or password it is incorrectly configured!

Similar to RSA, the AWS CLI credential-helper should be using your keys to create and send a dynamic password that updates every 15 minutes.

@ssheff
ssheff / delete_all_object_versions.sh
Created June 9, 2022 14:31 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'`
@ssheff
ssheff / cars.csv
Created September 27, 2021 13:23 — forked from noamross/cars.csv
mpg cyl disp hp drat wt qsec vs am gear carb
Mazda RX4 21 6 160 110 3.9 2.62 16.46 0 1 4 4
Mazda RX4 Wag 21 6 160 110 3.9 2.875 17.02 0 1 4 4
Datsun 710 22.8 4 108 93 3.85 2.32 18.61 1 1 4 1
Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
Hornet Sportabout 18.7 8 360 175 3.15 3.44 17.02 0 0 3 2
Valiant 18.1 6 225 105 2.76 3.46 20.22 1 0 3 1
Duster 360 14.3 8 360 245 3.21 3.57 15.84 0 0 3 4
Merc 240D 24.4 4 146.7 62 3.69 3.19 20 1 0 4 2
Merc 230 22.8 4 140.8 95 3.92 3.15 22.9 1 0 4 2
@ssheff
ssheff / aws_delete_ami_boto3.py
Created September 21, 2021 20:40 — forked from nirbhabbarat/aws_delete_ami_boto3.py
Delete/Deregister 30 days old AMI in AWS using boto3 and python
#!/usr/bin/env python
##### USE ON YOUR OWN RISK - THIS IS GOING TO DEREGISTER AMI OLDER THAN 30 DAYS
import boto3
from dateutil.parser import parse
import datetime
age = 30
aws_profile_name = 'prod'
def days_old(date):
get_date_obj = parse(date)
@ssheff
ssheff / Enable_LB_Access_Logs.py
Created September 16, 2021 01:46 — forked from deepak7093/Enable_LB_Access_Logs.py
Python script to enable AWS load balancer access logs
import boto3
"""
## Pre-requsites: Need to add tag on loadbalancer as `Environment:Production`.
Name: Enable AccessLogs for production load-balancers
Author: Deepak Dalvi
Version: 1.0.0
"""
AWS_ACCESS_KEY = ''
@ssheff
ssheff / awsamplifyexpo.js
Created October 28, 2020 20:08 — forked from AndrzejKomarnicki/awsamplifyexpo.js
AWS Amplify and AppSync with Expo (React Native) cheat sheet
AWS Amplify and AppSync with Expo (React Native) cheat sheet and reference guide
[AWS Amplify] https://aws-amplify.github.io
[Expo] https://expo.io
// In order to run the Android emulator with Expo you will need Android Studio with Android Virtual Device Manager
// In order to run the iOS simulator with Expo you'll need Xcode
INITIALIZE PROJECT
@ssheff
ssheff / install-jitsi-meet-simple.sh
Created March 13, 2020 20:44 — forked from sloan58/install-jitsi-meet-simple.sh
Jitsi Meet AWS User Data
#!/usr/bin/env bash
DOMAIN="" # Your Route53 TLD (ex: mydomain.com)
SUBDOMAIN="" # The meeting subdomain (ex: meet (for meet.mydomain.com))
CONFIGURE_AUTH=true # Boolean to configure internal_plain auth or not
PROSODY_USER="" # If you're configuring auth, the user account name (will login as ${PROSODY_USER}@${SUBDOMAIN}.${DOMAIN} )
PROSODY_PASS="" # If you're configuring auth, the user password (escape special characters)
AWS_ACCESS_KEY="" # Your AWS Access Key
AWS_SECRET_KEY="" # Your AWS Secret Key
LETS_ENCRYPT_EMAIL="" # Email address to use for Let's Encrypt certificate