Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- GitLab
- jdk
- Transit Gateway
- EC2
- 권한제어
- scheduling
- history
- openJDK
- OpenSSH
- 서버 시간 설정
- VPN
- cron
- self-managed
- Tunnel
- Network
- amazone linux
- TransitGateway
- jdk 버전 업그레이드
- TGW
- Lambda
- audit
- eventbridge
- 파일찾기
- 비용절감
- ssh
- log
- time_format
- Linux
- aws
- finops
Archives
- Today
- Total
목록infra (1)
너기의 기술 성장 일기

AWS Lambda를 이용하여 EC2 Tag Key=Value 값을 기준으로 시작, 종료하는 예제이다. 우선 Role에 필요한 Policy를 만든다. { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "ec2:Describe*", "ec2:Start*", "ec2:Stop*" ], "Resource": "*" } ] } 다음 Role을 생성하고 이전에 생성한 Policy 정책을 할당한다. Role이 생성 완료되었으면 Lambda를 생성하고 직전에 만든 Role을 연결한다. 이때 Runtime은 Python으로 지정한다. 이후 코드소스에 아래 스크립트를 작성한다. import bo..
infra
2023. 7. 6. 10:10