Skip to content

Commit 15b64f3

Browse files
authored
Update README.md
1 parent 932c798 commit 15b64f3

File tree

1 file changed

+12
-4
lines changed
  • 106-Connecting-to-EC2-Instances-Using-Session-Manager

1 file changed

+12
-4
lines changed

106-Connecting-to-EC2-Instances-Using-Session-Manager/README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ cdk deploy
3535

3636
### Navigate up to the main directory for this recipe (out of the “cdk-AWS-Cookbook-106” directory):
3737

38-
`cd ..`
38+
```
39+
cd ..
40+
```
3941

4042

4143
## Steps
@@ -184,11 +186,15 @@ aws iam delete-role --role-name AWSCookbook106SSMRole
184186

185187
### Go to the cdk-AWS-Cookbook-106 directory:
186188

187-
`cd cdk-AWS-Cookbook-106/`
189+
```
190+
cd cdk-AWS-Cookbook-106/
191+
```
188192

189193
### To clean up the environment variables, run the helper.py script in this recipe’s cdk- directory with the --unset flag, and copy the output to your terminal to export variables:
190194

191-
`python helper.py --unset`
195+
```
196+
python helper.py --unset
197+
```
192198

193199
### Unset your manually created environment variables:
194200

@@ -200,7 +206,9 @@ unset INSTANCE_ID
200206

201207
### Use the AWS CDK to destroy the resources, deactivate your Python virtual environment, and go to the root of the chapter:
202208

203-
`cdk destroy && deactivate && rm -r .venv/ && cd ../..`
209+
```
210+
cdk destroy && deactivate && rm -r .venv/ && cd ../..
211+
```
204212

205213
## Discussion
206214
When you use AWS SSM Session Manager to connect to EC2 instances, you eliminate your dependency on Secure Shell (SSH) over the internet for command-line access to your instances. Once you configure Session Manager for your instances, you can instantly connect to a bash shell session on Linux or a PowerShell session for Windows systems.

0 commit comments

Comments
 (0)