Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 599203f

Browse files
author
Paul Cornell
committed
New tutorials and troubleshooters.
1 parent 05b6b63 commit 599203f

74 files changed

Lines changed: 4310 additions & 849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc_source/_sample-prereqs.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
either express or implied. See the License for the specific language governing permissions and
99
limitations under the License.
1010

11-
This sample assumes you already have the |AC9IDE| for your |envfirst| open in your web browser, and that you're using an |envfirstec2| that is connected to an |EC2| instance running Amazon Linux.
12-
If you're using a different operating system or using an |envfirstssh|, you might need to adapt this sample's instructions to correctly
13-
install and configure this sample's required tools. To create
14-
an |env|, see :ref:`Creating an Environment <create-environment>`.
11+
Before you use this sample, be sure to meet the following requirements.
1512

16-
When you're using this sample, be sure you're signed in to AWS with the AWS account ID and name and password of the
17-
user you created or identified in :doc:`Team Setup <setup>`.
13+
* **You must have an existing AWS Cloud9 development environment.** This sample assumes you already have an |envfirstec2| that is connected to an |EC2| instance running Amazon Linux.
14+
If you have a different type of |env| or
15+
operating system, you might need to adapt this sample's instructions to set up related tools. See :ref:`Creating an Environment <create-environment>` for details.
16+
* **You have the AWS Cloud IDE for the existing environment already open.** When you open an |env|, |AC9| opens the |IDE| for that |env| in your web browser.
17+
See :ref:`Opening an Environment <open-environment>` for details.

doc_source/app-preview.rst

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ Run an Application
3434
==================
3535

3636
Before you can preview your application from within the |IDE|, it must be running in the |envfirst| using
37-
HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1` or :code:`localhost`.
37+
HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1`, :code:`localhost`, or :code:`0.0.0.0`.
3838

39-
.. note:: You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1` or :code:`localhost`. However, you won't be able to preview your running application from within the |IDE|.
39+
.. note:: You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1`, :code:`localhost`, or :code:`0.0.0.0`. However, you won't be able to preview your running application from within the |IDE|.
40+
41+
If you run with the IP of :code:`0.0.0.0`, anyone can potentially access your running application. For approaches to address this issue, see the following:
42+
43+
* :ref:`app-preview-share-security-group` in *Share a Running Application over the Internet*
44+
* :ref:`app-preview-share-subnet` in *Share a Running Application over the Internet*
4045

4146
To write the code to run your application on a specific port and IP, see your application's documentation.
4247

@@ -105,7 +110,7 @@ Then follow the instructions in the next procedure to preview it. On the applica
105110
Preview a Running Application
106111
=============================
107112

108-
With your application already running using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1` or :code:`localhost` in the |env|,
113+
With your application already running using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082` with the IP of :code:`127.0.0.1`, :code:`localhost`, or :code:`0.0.0.0` in the |env|,
109114
and with the corresponding application code file open and active in the |AC9IDE|, choose one of the following on the menu bar:
110115

111116
* :guilabel:`Preview, Preview Running Application`
@@ -116,6 +121,10 @@ This opens an application preview tab within the |env|, and then displays the ap
116121
To enable others to preview the running application outside of the |IDE|, see :ref:`app-preview-share`.
117122

118123
.. note:: If the application is not already running, you will see an error on the application preview tab. Run or restart the application, and then choose the menu bar command again.
124+
125+
If your application cannot run on any of the preceding ports or IPs, or if your application must run on more than one of these ports at the same time (for example, your application must
126+
run on ports :code:`8080` and :code:`3000` at the same time), the application preview tab might display an error or might be blank. This is because the application preview tab
127+
within the |env| works only with the preceding ports and IPs, and it works with only a single port at a time.
119128

120129
We don't recommend sharing the URL in the application preview tab with others. (The URL displays using the format
121130
:code:`https://ENVIRONMENT_ID.vfs.cloud9.REGION_ID.amazonaws.com/`.) This URL works only when the |IDE| for the |env| is open and the application is running in the same web browser.
@@ -228,8 +237,15 @@ Step 2: Set Up the Security Group for the Instance
228237
In this step, you use the |EC2| console to set up the |EC2| security group for the instance that is connected to the |env|, to allow incoming HTTP requests over port 8080, 8081, or 8082.
229238

230239
.. note:: You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`. If you are running on a different protocol or port, substitute it throughout this step.
231-
You won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`
232-
using IP :code:`127.0.0.1` or :code:`localhost`.
240+
You won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over one of the ports and IPs as described in :ref:`app-preview-preview-app`.
241+
242+
For an additional layer of security, you can also set up a network access control list (ACL) for a subnet in a virtual private cloud (VPC) that the instance can use.
243+
For more information about security groups and network ACLs, see the following:
244+
245+
* :ref:`app-preview-share-subnet`
246+
* :VPC-ug:`Security <VPC_Security>` in the |VPC-ug|
247+
* :VPC-ug:`Security Groups for Your VPC <VPC_SecurityGroups>` in the |VPC-ug|
248+
* :VPC-ug:`Network ACLs <VPC_ACLs>` in the |VPC-ug|
233249

234250
#. In the |IDE| for the |env|, on the menu bar, choose your user icon, and then choose :guilabel:`Manage EC2 Instance`. Then skip ahead to step 3 in this procedure.
235251
#. If choosing :guilabel:`Manage EC2 Instance` or other steps in this procedure display errors, we recommend you sign in to the |EC2| console using credentials for an |IAM| administrator user in your AWS account, and then
@@ -244,7 +260,7 @@ In this step, you use the |EC2| console to set up the |EC2| security group for t
244260

245261
#. In the :guilabel:`Description` tab for the instance, choose the security group link next to :guilabel:`Security groups`.
246262
#. With the security group displayed, look on the :guilabel:`Inbound` tab. If a rule already exists where :guilabel:`Type` is set to :guilabel:`Custom TCP Rule` and :guilabel:`Port Range` is set to
247-
:guilabel:`8080`, :guilabel:`8081`, or :guilabel:`8082`, choose :guilabel:`Cancel`, and skip ahread to :ref:`app-preview-share-subnet`. Otherwise, choose :guilabel:`Edit`.
263+
:guilabel:`8080`, :guilabel:`8081`, or :guilabel:`8082`, choose :guilabel:`Cancel`, and skip ahead to :ref:`app-preview-share-subnet`. Otherwise, choose :guilabel:`Edit`.
248264
#. In the :guilabel:`Edit inbound rules` dialog box, choose :guilabel:`Add Rule`.
249265
#. For :guilabel:`Type`, choose :guilabel:`Custom TCP Rule`.
250266
#. For :guilabel:`Port Range`, type :code:`8080`, :code:`8081`, or :code:`8082`.
@@ -263,8 +279,14 @@ Step 3: Set Up the Subnet for the Instance
263279
In this step, you use the consoles for |EC2| and |VPClong| (|VPC|) to set up the subnet for the |EC2| instance that is connected to the |env|, to also allow incoming HTTP requests over port 8080, 8081, or 8082.
264280

265281
.. note:: You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`. If you are running on a different protocol or port, substitute it throughout this step.
266-
You won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`
267-
using IP :code:`127.0.0.1` or :code:`localhost`.
282+
You won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over the ports and IPs as described in :ref:`app-preview-preview-app`.
283+
284+
This step describes how to set up a network ACL for a subnet in an |VPC| that the instance can use. This step is not required. However, it adds an additional layer of security when compared to just using
285+
security groups. For more information
286+
about network ACLs, see the following:
287+
288+
* :VPC-ug:`Security <VPC_Security>` in the |VPC-ug|
289+
* :VPC-ug:`Network ACLs <VPC_ACLs>` in the |VPC-ug|
268290

269291
#. With the |EC2| console already open from the previous step, in the service navigation pane, expand :guilabel:`Instances` if it is not already expanded,
270292
and then choose :guilabel:`Instances`.
@@ -292,10 +314,9 @@ In this step, you use the consoles for |EC2| and |VPClong| (|VPC|) to set up the
292314
Step 4: Change the Running Application IP
293315
-----------------------------------------
294316

295-
In your code, switch from using IP :code:`127.0.0.1` or :code:`localhost` to using IP :code:`0.0.0.0`. To use this new IP, stop the application if is already running, and then run the application again.
317+
In your code, switch from using IP :code:`127.0.0.1`, :code:`localhost`, or :code:`0.0.0.0` to using the IP address or addresses you specified in the previous steps in this section. To use these new IPs, stop the application if is already running, and then run the application again.
296318

297-
.. note:: You won't be able to preview your running application from within the |IDE| until you switch back to using IP :code:`127.0.0.1` or :code:`localhost`
298-
running HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`.
319+
.. note:: You won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over one of the ports and IPs as described in :ref:`app-preview-preview-app`.
299320

300321
.. _app-preview-share-url:
301322

@@ -310,8 +331,8 @@ not the default for that protocol (for example, :code:`http://192.0.2.0:8080/ind
310331
:ec2-user-guide:`Associating an Elastic IP Address with a Running Instance <elastic-ip-addresses-eip.html#using-instance-addressing-eips-associating>` in the |EC2-ug|. Note also that
311332
allocating an Elastic IP address might result in charges to your AWS account. For more information, see `Amazon EC2 Pricing <https://aws.amazon.com/ec2/pricing/>`_.
312333

313-
You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`. However, you won't be able to preview your running application from within the |IDE| until you switch back to running using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`
314-
using IP :code:`127.0.0.1` or :code:`localhost`.
334+
You don't have to run using HTTP over port :code:`8080`, :code:`8081`, or :code:`8082`. However, you won't be able to preview your running application from within the |IDE|
335+
until you switch back to running using HTTP over one of the ports and IPs as described in :ref:`app-preview-preview-app`.
315336

316337
If users make requests to the preceding URL, and those requests originate from a virtual private network (VPN) that blocks traffic over the requested protocol or
317338
port, those requests might fail. Those users must use a different network that allows traffic over the requested protocol and port. For more information, see your network administrator.

doc_source/auth-and-access-control.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ to sign in to secure AWS webpages like the |AC9| console, |console|,
6868
AWS Discussion Forums, and |SUPlong| Support Center.
6969

7070
In addition to a user name and password, you can also generate access keys for each user. You can use these keys when you access AWS services
71-
programmatically, either through one of the several AWS SDKs or by using the |clilong| (|cli|). The AWS SDKs and the |cli| use these access keys to
71+
programmatically, either through one of the several AWS SDKs or by using the |clilong| (|cli|) or the aws-shell. The AWS SDKs, the |cli|, and the aws-shell use these access keys to
7272
cryptographically sign your request. If you don't use these tools, you must sign the request yourself. |AC9| supports Signature Version 4, a protocol
7373
for authenticating inbound API requests. For more information about authenticating requests, see :AWS-gr:`Signature Version 4 Signing Process <signature-version-4>` in the |AWS-gr|.
7474

doc_source/change-environment.rst

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Changing Environment Settings in |AC9long|
2020

2121
You can change the preferences or settings for an |envfirst|.
2222

23+
* :ref:`change-environment-single`
24+
* :ref:`change-environment-description`
25+
* :ref:`change-environment-description-code`
26+
2327
.. _change-environment-single:
2428

2529
Change |envtitle| Preferences
@@ -34,8 +38,8 @@ Change |envtitle| Preferences
3438

3539
.. _change-environment-description:
3640

37-
Change |envtitle| Settings
38-
==========================
41+
Change |envtitle| Settings with the Console
42+
===========================================
3943

4044
#. Open the |AC9| console, if it isn't already open, at |AC9Console_link|.
4145
#. In the top navigation bar, choose the AWS Region where the |env| is located.
@@ -81,3 +85,42 @@ Change |envtitle| Settings
8185
:ref:`share-environment-delete-member`.
8286

8387
.. include:: _find-environment.txt
88+
89+
.. _change-environment-description-code:
90+
91+
Change |envtitle| Settings with Code
92+
====================================
93+
94+
To use code to change the settings of an |env| in |AC9|, call the |AC9| update |env| operation, as follows.
95+
96+
.. list-table::
97+
:widths: 1 1
98+
:header-rows: 0
99+
100+
* - |cli|
101+
- :AC9-cli:`update-environment <update-environment>`
102+
* - |sdk-cpp|
103+
- :sdk-cpp-ref:`UpdateEnvironmentRequest <LATEST/class_aws_1_1_cloud9_1_1_model_1_1_update_environment_request>`,
104+
:sdk-cpp-ref:`UpdateEnvironmentResult <LATEST/class_aws_1_1_cloud9_1_1_model_1_1_update_environment_result>`
105+
* - |sdk-go|
106+
- :sdk-for-go-api-ref:`UpdateEnvironment <service/cloud9/#Cloud9.UpdateEnvironment>`,
107+
:sdk-for-go-api-ref:`UpdateEnvironmentRequest <service/cloud9/#Cloud9.UpdateEnvironmentRequest>`,
108+
:sdk-for-go-api-ref:`UpdateEnvironmentWithContext <service/cloud9/#Cloud9.UpdateEnvironmentWithContext>`
109+
* - |sdk-java|
110+
- :sdk-java-api:`UpdateEnvironmentRequest <com/amazonaws/services/cloud9/model/UpdateEnvironmentRequest>`,
111+
:sdk-java-api:`UpdateEnvironmentResult <com/amazonaws/services/cloud9/model/UpdateEnvironmentResult>`
112+
* - |sdk-js|
113+
- :sdk-for-javascript-api-ref:`updateEnvironment <AWS/Cloud9.html#updateEnvironment-property>`
114+
* - |sdk-net|
115+
- :sdk-net-api-v3:`UpdateEnvironmentRequest <items/Cloud9/TUpdateEnvironmentRequest>`,
116+
:sdk-net-api-v3:`UpdateEnvironmentResponse <items/Cloud9/TUpdateEnvironmentResponse>`
117+
* - |sdk-php|
118+
- :sdk-for-php-api-ref:`updateEnvironment <api-cloud9-2017-09-23.html#updateenvironment>`
119+
* - |sdk-python|
120+
- :sdk-for-python-api-ref:`update_environment <services/cloud9.html#Cloud9.Client.update_environment>`
121+
* - |sdk-ruby|
122+
- :sdk-for-ruby-api-ref:`update_environment <Aws/Cloud9/Client.html#update_environment-instance_method>`
123+
* - |TWPlong|
124+
- :TWP-ref:`Update-C9Environment <items/Update-C9Environment>`
125+
* - |AC9| API
126+
- :AC9-api:`UpdateEnvironment <API_UpdateEnvironment>`

0 commit comments

Comments
 (0)