https://github.com/awsdataarchitect/eice-mac-ec2-cdk
CDK code to demo connectivity to Mac M1 EC2 instance inside VPC using EC2 Instance Connect Endpoint.
https://github.com/awsdataarchitect/eice-mac-ec2-cdk
aws cdk dedicated-hosts ec2 ec2-instance-connect-endpoint macos
Last synced: about 1 month ago
JSON representation
CDK code to demo connectivity to Mac M1 EC2 instance inside VPC using EC2 Instance Connect Endpoint.
- Host: GitHub
- URL: https://github.com/awsdataarchitect/eice-mac-ec2-cdk
- Owner: awsdataarchitect
- Created: 2023-10-11T23:05:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T23:40:10.000Z (over 2 years ago)
- Last Synced: 2025-03-12T13:16:55.312Z (over 1 year ago)
- Topics: aws, cdk, dedicated-hosts, ec2, ec2-instance-connect-endpoint, macos
- Language: TypeScript
- Homepage: https://vivek-aws.medium.com/deploying-an-ec2-m1-mac-mac2-metal-d66157dc2663
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Open source CDK code to demo connectivity to Mac M1 EC2 instance inside VPC using EC2 Instance Connect Endpoint.
This is a CDK project written in TypeScript that provisions an Apple Mac M1 Dedicated Host and EC2 Instance in a private subnet within a VPC. It also sets up an EC2 Instance Connect Endpoint for secure connectivity to the Mac M1 EC2 instance over the internet. An EventBridge rule activates a Lambda Function, ensuring the automatic termination of the EC2 Instance and the release of the Dedicated Host after a preconfigured interval of 24 hours. This way, you only incur the minimum 1-day charges (approximately $15.60) for using the Mac M1 EC2. The accompanying blog post provides a step-by-step guide on how to access the EC2 Mac Desktop UI from your PC.
The `cdk.json` file tells the CDK Toolkit how to execute your app.
## Useful commands
* `npm run build` compile typescript to js
* `npm run watch` watch for changes and compile
* `npm run test` perform the jest unit tests
* `cdk deploy` deploy this stack to your default AWS account/region
* `cdk diff` compare deployed stack with current state
* `cdk synth` emits the synthesized CloudFormation template