You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: doc_source/_sample-prereqs.txt
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@
8
8
either express or implied. See the License for the specific language governing permissions and
9
9
limitations under the License.
10
10
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.
15
12
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.
Copy file name to clipboardExpand all lines: doc_source/app-preview.rst
+34-13Lines changed: 34 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,14 @@ Run an Application
34
34
==================
35
35
36
36
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`.
38
38
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*
40
45
41
46
To write the code to run your application on a specific port and IP, see your application's documentation.
42
47
@@ -105,7 +110,7 @@ Then follow the instructions in the next procedure to preview it. On the applica
105
110
Preview a Running Application
106
111
=============================
107
112
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|,
109
114
and with the corresponding application code file open and active in the |AC9IDE|, choose one of the following on the menu bar:
@@ -116,6 +121,10 @@ This opens an application preview tab within the |env|, and then displays the ap
116
121
To enable others to preview the running application outside of the |IDE|, see :ref:`app-preview-share`.
117
122
118
123
.. 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.
119
128
120
129
We don't recommend sharing the URL in the application preview tab with others. (The URL displays using the format
121
130
: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
228
237
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.
229
238
230
239
.. 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|
233
249
234
250
#. 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.
235
251
#. 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
244
260
245
261
#. In the :guilabel:`Description` tab for the instance, choose the security group link next to :guilabel:`Security groups`.
246
262
#. 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`.
248
264
#. In the :guilabel:`Edit inbound rules` dialog box, choose :guilabel:`Add Rule`.
249
265
#. For :guilabel:`Type`, choose :guilabel:`Custom TCP Rule`.
250
266
#. 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
263
279
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.
264
280
265
281
.. 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|
268
290
269
291
#. With the |EC2| console already open from the previous step, in the service navigation pane, expand :guilabel:`Instances` if it is not already expanded,
270
292
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
292
314
Step 4: Change the Running Application IP
293
315
-----------------------------------------
294
316
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.
296
318
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`.
299
320
300
321
.. _app-preview-share-url:
301
322
@@ -310,8 +331,8 @@ not the default for that protocol (for example, :code:`http://192.0.2.0:8080/ind
310
331
: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
311
332
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/>`_.
312
333
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`.
315
336
316
337
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
317
338
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.
Copy file name to clipboardExpand all lines: doc_source/auth-and-access-control.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ to sign in to secure AWS webpages like the |AC9| console, |console|,
68
68
AWS Discussion Forums, and |SUPlong| Support Center.
69
69
70
70
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
72
72
cryptographically sign your request. If you don't use these tools, you must sign the request yourself. |AC9| supports Signature Version 4, a protocol
73
73
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|.
0 commit comments