## 적용 SSM 배포 스크립트
---
schemaVersion: "2.2"
description: "Command Document Example JSON Template"
mainSteps:
- action: "aws:runShellScript"
name: "deploy"
inputs:
runCommand:
- "/home/XXXcomadm/service/XXXmq/bin/ssm_command.sh"


=========================================================
## EC2 에서 자동화 스크립트 실행 방법




############################
While launching the EC2, use the below user data:
For Ubuntu:
#!/bin/bash
apt update -y
snap switch --channel=candidate amazon-ssm-agent
systemctl start snap.amazon-ssm-agent.amazon-ssm-agent.service
For RHEL:
#!/bin/bash
dnf update -y
dnf install -y https://s3.amazonaws.com/ec2-download...
Automation scipt (Document) is available in this Github link (given below):
https://shorturl.at/dkwM8
#####################################
## SSM - Documents 이동
- Create Document ==> Command or Session 선택






## Owned by me (만든 문서 확인)



- Run Command 클릭




- Output 옵션 설정


## 배포 후 상태




https://www.youtube.com/watch?v=55sHGJtiVfo
'[AWS-FRF] > SSM' 카테고리의 다른 글
| [중요][AWS] Systems Manager용 Cron 및 비율 표현식!! (16) | 2024.09.23 |
|---|---|
| [참고] AWS Systems Manager : Execute commands & scripts on EC2 Linux instance Remotely | AWS SSM | 2021 (17) | 2024.09.01 |
댓글