Skip to content

richardfan1126/ssm-patch-portal

Repository files navigation

SSM Patch Portal

Demo

Deployment guide

Prerequisite

Local build

Docker build

Steps

  1. Clone the repository

    git clone https://github.com/richardfan1126/ssm-patch-portal.git --recurse-submodules
  2. Create a .env file inside project root

    Input the value for the following parameters

    1. 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>
      
    2. 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>
      
  3. (Optional) Install and bootstrap required tools

    For AWS CDK, make sure you have already run the bootstrap command

    cdk bootstrap aws://ACCOUNT-NUMBER/REGION
  4. 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] 
  5. After the backend deployment, press Y + <Enter> to continue the frontend deployment.

    Continue to deploy frontend stack? (Y/n) Y
    
  6. 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
     ...
    

Cleanup

  1. Delete CloudFormation Stacks

    1. SsmPatchPortal
    2. SsmPatchPortalFrontend
  2. Empty and delete S3 buckets. (The bucket name have the following prefix)

    1. ssmpatchportalfrontend-
    2. ssmpatchportal-s3bucketsta-
  3. Delete SSM associations

    1. ssm-patch-portal-<instance_id>
    2. ssm-patch-portal-scan

Architecture

About

A webportal that can help you easily manage instance patching via AWS SSM Patch Manager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published