본문 바로가기 메뉴 바로가기

fendys

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

fendys

검색하기 폼
  • ALL fendys write (151)
    • AWS (21)
    • linux (93)
    • security (0)
    • ansible (13)
    • monitoring (2)
    • VM (0)
    • DB (4)
    • windows (4)
    • it (12)
    • 가상화폐 (0)
  • 방명록

AWS (21)
aws update iam policy python (boto3)

import boto3from botocore.exceptions import ClientErrorimport jsondef get_policy_document(iam_client, policy_arn): """ IAM 정책의 문서를 가져옵니다. :param iam_client: Boto3 IAM 클라이언트 :param policy_arn: 조회할 IAM 정책의 ARN :return: 정책 문서 (JSON 형식) """ try: response = iam_client.get_policy(PolicyArn=policy_arn) policy_version_id = response['Policy']['DefaultVersionId'] ..

AWS 2024. 9. 2. 20:12
aws multi account attach iam role & policy python (boto3)

import boto3from botocore.exceptions import ClientErrordef attach_policy_to_role(profile_name, role_name, policy_arn): """ IAM 역할에 정책을 연결합니다. :param profile_name: AWS CLI 프로파일 이름 :param role_name: 정책을 연결할 IAM 역할의 이름 :param policy_arn: 연결할 IAM 정책의 ARN """ # 지정된 프로파일을 사용하는 세션 생성 session = boto3.Session(profile_name=profile_name) # 세션에서 IAM 클라이언트 생성 iam_client = sessio..

AWS 2024. 9. 2. 20:08
aws multi account create iam policy python (boto3)

import boto3import json# 프로파일 이름과 관련된 정보를 리스트로 관리profiles = ['fendys-prodn','fendys-dev']# IAM 정책 문서 정의policy_document = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:*" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "network-firewall:*..

AWS 2024. 9. 2. 20:05
aws multi account create iam role python (boto3)

import boto3import json# IAM 역할을 생성하고 태그를 추가하는 함수def create_role_and_add_tags(profile_name, role_name, trust_policy, tags): # 세션 생성 session = boto3.Session(profile_name=profile_name) iam_client = session.client('iam') # IAM 역할 생성 print(f"Creating role {role_name} in profile {profile_name}...") response = iam_client.create_role( RoleName=role_name, AssumeRolePo..

AWS 2024. 9. 2. 20:00
aws s3 bucket lifecycle set

s3 버킷을 삭제 할때 파일 또는 폴더가 너무 많은경우 사용하면 유용한 케이스다 현재 설정된 lifecycle 확인 하는 방법 cli : aws s3api get-bucket-lifecycle --bucket fendys-s3-bucket --profile aws-fendys 새로운 lifecycle 설정하기 cli : aws s3api put-bucket-lifecycle-configuration --bucket fendys-s3-bucket --lifecycle-configuration file://fendys-lifecycle.json --profile aws-fendys fendys-lifecycle.json 내용 { "Rules": [ { "Expiration": { "Days": 1 }, "I..

AWS 2023. 7. 12. 20:54
install on centos7 + docker +awx 17.1.0

yum install epel-release yum update yum -y install git gcc gcc-c++ ansible nodejs gettext device-mapper-persistent-data lvm2 bzip2 python3-pip python-docker wget nano yum -y install docker-ce systemctl start docker systemctl enable docker pip3 install --upgrade pip pip3 install setuptools_rust pip3 install wheel pip3 install docker-compose yum -y install libselinux-python3 cd /data git clone -b ..

AWS 2022. 6. 2. 17:03
IDC -> aws 실시간 sync (lsync)

조건 실시간 싱크 IDC Server → AWS Migration Server로 단방향 싱크 Lsync 사용 diagram migration data info src (IDC Server) : 192.168.0.1:/data/data_stage dst (AWS EC2) : /migration lsyncd config settings { logfile="/var/log/lsyncd/lsyncd.log", statusFile="/var/log/lsyncd/lsyncd-status.log", statusInterval = 60 } sync { default.rsyncssh, source="/data/data_stage", host="fendys@10.20.30.40", targetdir="/migration"..

AWS 2022. 3. 16. 11:20
AWS Root - Yubikey

aws root 게정에 대한 무분별한 사용 및 패스워드 유출에 대한 이슈를 제거 하기 위하여 MFA인증 방식을 추가한다. 여기에서는 Yubikey라는 UBS 타입의 인증 수단을 사용 하였다. ( https://www.ubikey.co.kr/ 참고) 키 담당자는 조직장 또는 담당자의 승인하에 기록을 남기고 사용하도록 프로세스를 정의 하는 것이 좋다. Root 계정은 Yubikey로 Hardware MFA가 이증인증 수단 - Yubikey AWS Root User로 로그인 Yubikey PC에 연결 https://aws.amazon.com 페이지로 이동 "Sign In to the Console"을 통한 로그인 Root Account 로그인을 선택 이후 Yubikey의 점멸하는 부분을 손으로 터치하여 인증을..

AWS 2022. 1. 30. 12:41
이전 1 2 3 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • [여행] warmfree
  • [재미] wowns
TAG
  • 윈도우서버 계정 관려
  • cgroup
  • shell connmad log
  • 특정 문구 치환
  • ILO
  • cmd로 윈도우 계정 관리
  • ios ansible
  • ISCSI 볼륨 RAC
  • ipmi
  • kernel 변경
  • 윈도우 cmd 계정 관리
  • DL20 GEN9 장비에 CentOS 7
  • CentOS 7 GUI
  • dl20 g9 centos7 설치
  • oracle linux8 kernel
  • windows.old 강제삭제
  • ansible network
  • cisco ansible
  • centos7 ntp
  • cmd로 계정 생성
  • nxos ansible
  • dl20
  • chrony
  • linux command log
  • 특정 라인삭제
  • vm rac
  • ansible ios
  • nutanix rac
  • dl20 centos7
  • 리눅스 커맨드 로그남기기
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바