Code Monkey home page Code Monkey logo

aws-samples / aws-integration-for-apache-guacamole Goto Github PK

View Code? Open in Web Editor NEW
19.0 6.0 4.0 643 KB

An AWS automation to integrate with Apache Guacamole. This solution use Eventbridge Rules and Lambda Functions to detect EC2 events in the VPC and create or remove connections in the Guacamole

License: MIT No Attribution

Python 53.83% Shell 27.91% PowerShell 18.26%
amazon apache automation aws cloudformation ec2 eventbridge guacamole python spot vdi

aws-integration-for-apache-guacamole's Introduction

AWS Integration for Apache Guacamole

This repository is a walk through of scripts that were made to quickly set up an automated VDI - Virtual Desktop Infrastructure - using the Apache Guacamole using Amazon EC2 Spot Instances.

This sample is an AWS automation to integrate with Apache Guacamole using Eventbridge Rules and Lambda Functions to detect EC2 events in the VPC and create or remove connections in the Guacamole

Requirements

You will need:

  • VPC with one public subnet and one or two private subnets, a NAT Gateway and/or Proxy or the AWS Network Firewall
  • Apache Guacamole installed
  • Guacamole API Credentials (User and Password)
  • S3 Bucket shared with the Organization or Account with the AWS Service Catalog Products
  • A domain or subdomain

Demo walkthrough

  1. Apache Guacamole setup:
    a) install Guacamole in EC2 instances or ECS/Fargate containers
    b) configure a domain or subdomain in the Route53 or your DNS
    c) In the ACM - Amazon Certificate Manager configure the domain/subdomain and validate it in the Route 53/DNS
    d) Create a target group in the 8080 port with the Apache Guacamole instances or ECS cluster
    e) setup ALB to listen in 443 port, attach the Certificate from ACM and the target group
    g) create a Guacamole API user
  2. Create S3 BUCKET to save Service Catalog Templates files and the Userdata scripts
  3. Create two secure Parameters (SecureString with default account KMS key) inside the AWS System Manager
    a) "guacaApiPassword" with the Apache Guacamole API password
    b) "developerUserPassword" with a MS Windows password
  4. Run the solution cloudformation script vdi-automated-solution.yaml
  5. Now just scheduele an Eventbridge Rule with a target to Lambda functions to create (CreateProductScheduledbyEventBridge) and Remove (DeleteProductScheduledbyEventBridge) Service Catalog products. Here you can find a python sample to create the Eventbridge Rules sample here

Multi-Account Environment

There are aways to work in a multi-account environment, for example, using CloudFormation StackSet, creating Eventbridge Rules in each account, etc. But we tested one solution using the SNS Topic in the managemnent account as a EventBridge Rule Target and subscribe the provisioning Lambda functions in the child accounts.

  1. Read and follow this documentation https://docs.aws.amazon.com/lambda/latest/dg/with-sns-example.html
  2. Create the SNS Topic (account A)
  3. Create the lambda function (account B)
  4. Create cross-acount roles
  5. From the LMS Create the EnventBridge Rule with the SNS Topic as a target

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-integration-for-apache-guacamole's People

Contributors

amazon-auto avatar scandura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.