After my investigation, I noticed that this feature is currently not supported because the environment owner is determined during creation. However there is a workaround to get the ownership of existing Cloud environment by creating an EBS snapshot of the current instance and attaching it to a new Cloud9 environment.
Detailed steps are as below.
- Context: I have an environment called Alpha in Cloud9 and I want to change the owner to user “test-cloud9-normal-user” having AdministratorAccess permission
- Find the cloud9 instance (it is usually of format aws-cloud9-<environment_name>-XXXXXX) on EC2 console, click the link of EBS ID on Descrption tab.
- Create a snapshot by clicking “Action”–>”Create Snapshot”.
- Once the snapshot is created, click on the snapshot and create a volume from it. You can give that new volume a name for identification purposes.
- Login as user “test-cloud9-normal-user” to create a Cloud9 environment by following the document https://docs.aws.amazon.com/cloud9/latest/user-guide/create-environment.html
- After new environment created, move the EC2 console and stop that new instance
- Find and click the link of EBS ID in this new instance.
- Detach this volume (Action–> Detach Volume), make sure the instance is in “stopped” state.
- Find the volume created on step 4, click Action–>Attach Volume, then choose the new EC2 instance and use “/dev/xvda” for Device. Click Attach button.
- Open the Cloud9 console and you can see user “test-cloud9-normal-user” is the owner of new environment. By clicking Open IDE button, you will see the migrated environment.
No Comments