- AWS CDK
- npm
- npx
- Python3 and pip3
- jq (Optional)
-
Clone the repository
git clone https://github.com/richardfan1126/ssm-patch-portal.git --recurse-submodules
-
Create a
.env
file inside project rootInput the value for the following parameters
-
Ec2IamRoleArns
All the IAM Role ARNs that is attached to the targeted EC2 instances. This is for granting access to those EC2 instances over the S3 bucket containing install patch lists and command output.
export Ec2IamRoleArns=<role_arn_1>,<role_arn_2>,...,<role_arn_n>
-
AdminEmail
The email address where the initial admin password will be sent to. Make sure this email address can receive incoming mail.
export AdminEmail=<admin_email_address>
-
-
(Optional) Install and bootstrap required tools
For AWS CDK, make sure you have already run the bootstrap command
cdk bootstrap aws://ACCOUNT-NUMBER/REGION
-
Run the deploy script
(For local build)
./deploy.sh
(For Docker build)
Run
./docker-build/deploy.sh
../docker-build/deploy.sh
When prompted, specify the location of aws credential.
More detail on: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where. (Default: ~/.aws)
Please specify the location of AWS credential [~/.aws]
-
After the backend deployment, press Y + <Enter> to continue the frontend deployment.
Continue to deploy frontend stack? (Y/n) Y
-
When the deployment completes, you can go to the web portal via the URL provided.
Use the password, which was sent to your email, to login.
Outputs: SsmPatchPortalFrontend.PortalURL = https://xxxxxxxxxxxxxx.cloudfront.net ...
-
Delete CloudFormation Stacks
- SsmPatchPortal
- SsmPatchPortalFrontend
-
Empty and delete S3 buckets. (The bucket name have the following prefix)
- ssmpatchportalfrontend-
- ssmpatchportal-s3bucketsta-
-
Delete SSM associations
- ssm-patch-portal-<instance_id>
- ssm-patch-portal-scan