mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-29 12:00:00 -05:00
157b3897f1
This is a simple sample application that includes a web form that creates a VM in a VMware Cloud on AWS SDDC.
1.1 KiB
1.1 KiB
This is a simple 'serverless application' that allows you to create a VM in an SDDC on VMware Cloud on AWS using a few cool tools including: Lambda, Cognito, S3, and VMware Cloud on AWS.
Matt Dreyer August 16, 2017
To make this work you need to do the following:
- Make sure that the vCenter in your SDDC is open to the world, or painfully configure Lambda to run in an VPC and NAT to a specific IP address (which requires even more IAM roles for VPC access).
- Create a working VM, and then Clone it to an OVF template in Content Library
- Use the vCenter API browser to discover the UUID of the your OVF template
- Update the HTML in index.html to match the UUID(s) of the VMs you wish to deploy
- Create a new Lambda function and upload vm-request-form.zip as your code
- Create a new Cognito "Federated Identity" for "anonymous access"
- Update the javascript in index.html to match your new Cognito role
- Create an S3 bucket and configure it for Webhosting
- Upload index.html and vmc-sticker.png into your bucket
- Muck with IAM until Lambda and Cognito get along together (required Cognito role permissions are AWSLambdaExecute and AWSLambdaRole)