Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ [Refactor] after_install.sh 기능 추가 #60

Merged
merged 1 commit into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ hooks:
runas: ec2-user
- location: scripts/switch.sh
timeout: 180
runas: ec2-user
runas: ec2-user

hooks:
AfterInstall:
- location: scripts/after_install.sh
timeout: 2400
runas: ec2-user
6 changes: 6 additions & 0 deletions scripts/after_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export AWS_ACCESS_KEY_ID=$(aws ssm get-parameters --region ap-northeast-2 --names AWS_ACCESS_KEY_ID --query Parameters[0].Value | sed 's/"//g')
export AWS_SECRET_ACCESS_KEY=$(aws ssm get-parameters --region ap-northeast-2 --names AWS_SECRET_ACCESS_KEY --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_PASSWORD=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_PASSWORD --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_USERNAME=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_USERNAME --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_URL=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_URL --query Parameters[0].Value | sed 's/"//g')

Loading