Skip to content

Instantly share code, notes, and snippets.

View zrierc's full-sized avatar
🍁
God in His Heaven. All's Right with The World.

zrie zrierc

🍁
God in His Heaven. All's Right with The World.
  • NERV.
  • Tokyo-3
View GitHub Profile
@zrierc
zrierc / README.md
Last active February 23, 2025 21:27
CDK Bootstrap template for Limited Role Permission (AWS Academy)

CDK Bootstrap Template for Limited Role Permission

Goal & Motivation

For some case, create/using IAM Roles is restricted in AWS Academy. You can only use existing IAM Roles and won't beable to create it for all AWS resources. One of example is CDK role for bootstraping environments.

For example when use AWS Academy Lab, you only have one Role called LabRole for all resources. It is not possible to create IAM Role in AWS Academy Lab because AWS Academy Lab restrict it dan you won't beable to create IAM Role. You can only use pre-defined IAM Roles from AWS Academy Lab.

Pre-Requisite

@zrierc
zrierc / .vimrc
Created January 19, 2024 06:19
Personal Vim Config
set nu rnu
set nocompatible
filetype on
filetype plugin on
filetype indent on
syntax on
" Soft wrap text
set formatoptions+=l
@zrierc
zrierc / starship.toml
Created December 18, 2023 13:59
Starship Config
palette = "catppuccin_frappe"
[directory]
read_only = " "
home_symbol = " ~"
truncation_length = 1
truncation_symbol = " /"
style = "bold lavender"
##### PRESET #####
@zrierc
zrierc / setup.sh
Last active August 21, 2023 13:45
Simple script for setup docker swarm and [portainer](https://www.portainer.io/) on Amazon EC2 Instances. To set-up swarm node worker/manager, simply add tag to EC2 Instances called 'SWARM_NODE_TYPE' with 'worker', 'manager', or 'leader' as value.
#!/bin/bash
set -e
# environment variable
AWS_ID=123456789012 # Change to your AWS ID
AWS_REGION=ap-southeast-1 # Change to your region
TZ=Asia/Jakarta # Change to your timezone
USER=ubuntu # Default user AMI Ubuntu 22.04/20.04
# get instance tag for swarm node type
@zrierc
zrierc / README.md
Last active December 30, 2022 08:28
Script for automate deleting AWS ECR Repositories.

ECR Repo Remover

simple script for automate deleting your ECR Repositories that not used anymore.

Requirements

  • AWS CLI v2.x.x
  • JQ

Usage

@zrierc
zrierc / Dockerfile
Last active September 15, 2022 08:52
Deploy laravel app to lambda container
FROM bref/php-80-fpm
# # Enable PHP Extensions
# # See https://github.com/brefphp/extra-php-extensions for references
# COPY --from=bref/extra-redis-php-80:0.10 /opt/bref-extra /opt/bref-extra
COPY . /var/task
CMD ["public/index.php"]