This repository contains CloudFormation template to quickly set up VSCode (code-server) instances in the us-west-2 region and Cloud9 (deprecated) instances in the us-east-1 region. Both setups are pre-configured with necessary permissions and are ready to be used for cloud security-related workshops or development.
Authored by: Anjali Singh Shukla & Divyanshu Shukla
Note: As AWS Cloud9 is deprecated, this script has been created to facilitate labs and learning environments efficiently.
Use the AWS CloudFormation quick-create links below to launch the desired environment in your preferred AWS region.
Region | Cloud9 (Not Recommended) | VSCode |
---|---|---|
us-east-1 | Launch | XX |
us-west-2 | XX | Launch |
- Note: Use VSCode link in
us-west-2
for deploying code-server (VSCode IDE).
-
Choose your Region: Use the table above to pick your region (e.g., us-east-1 or us-west-2) and launch the CloudFormation stack for Cloud9 (Not Recommended) or VSCode .
-
Monitor the Stack Creation: The stack will take about 10 minutes to complete.
-
Accessing the Environment: Once the stack creation is complete, you can retrieve the Cloud9 or VSCode URL using the following command.
Replace
Cloud9Url
withVSCodeUrl
for VSCode instance.- For cloud9 (Not Recommended)
aws cloudformation describe-stacks --stack-name securitydojo-eks-workshop --query 'Stacks[0].Outputs[?OutputKey==`Cloud9Url`].OutputValue' --output text --region us-east-1
- For VSCodeUrl (Recommended)
aws cloudformation describe-stacks --stack-name securitydojo-eks-workshop --query 'Stacks[0].Outputs[?OutputKey==`IdeUrl`].OutputValue' --output text --region us-west-2
-
Access the cloudformation
Outputs
.- CloudFrontUrl
- To access the cloudFront url for the VSCode access
- SecretsManagerUrl
- Retrieve the secret to access the VSCode IDE.
- CloudFrontUrl
- Access the
CloudFrontUrl
& follow next steps from terraform-eks to deployeks cluster
.
To avoid unnecessary costs, be sure to delete the CloudFormation stacks and any created AWS resources once you're finished.
-
To delete the Cloud9 or VSCode instance, run the following command:
aws cloudformation delete-stack --stack-name securitydojo-eks-workshop
-
Follow the cleanup instructions for the EKS resources, either through
eksctl
or Terraform.
- The views expressed are solely those of the speaker and do not reflect the opinions of the employer. Use at your own risk.
- The password is temporary and regenerates each time the script runs.
- Do not push this code while the VS Code server is running.
- The author is not responsible for any charges or security issues that may arise. This is shared under the MIT 0 license.
- This project is licensed under the GPL-3.0 license. See the LICENSE file for details.
- This repository uses code from the AWS EKS Workshop, licensed under the Apache-2.0.
- The CloudFormation templates have been adapted for use in the peachycloudsecurity EKS workshop.
- AWS-Samples under the Apache-2.0 license
- Thanks to coder team
- Thanks to AWS eks-workshop-v2
This project is maintained by the Kubernetes Village team. Contributions are welcome!
For more information, visit our GitHub page.