Follow this guide
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Follow this guide
TL;DR:
- Click the right top menu of your AWS console
- Choose
security credentials
- Create access key
- Download/write down your access + secret key
Type aws configure
, put the access key
and secret key
you've seen earlier.
ssh-keygen -f app-keypair
Follow this guide
Set configurations:
pulumi config set aws:region ap-southeast-1
pulumi config set publicKeyPath app-keypair.pub
pulumi config set privateKeyPath app-keypair
pulumi config set dbPassword Alch3mist --secret
Set passphrase (we don't use any):
mkdir -p ./pulumiLock
export PULUMI_BACKEND_URL="file://./pulumiLock"
export PULUMI_CONFIG_PASSPHRASE=
Create EC2 and RDS
# pulumi login --local
pulumi up
Show EC2 and RDS address
pulumi stack output
ssh -i app-keypair ubuntu@$(pulumi stack output app-eip-public-dns)
mysql -u admin -pAlch3mist --host <app-rds-address>
# Paste from ./sql