@studion/infra-code-blocks 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -284,6 +284,34 @@ export type WebServerArgs = {
284
284
  };
285
285
  ```
286
286
 
287
+ #### Exec into running ECS task
288
+
289
+ **Prerequisites**
290
+
291
+ 1. Install the [Session Manager plugin](https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-macos-overview.html#install-plugin-macos)
292
+
293
+ ```bash
294
+ $ brew install --cask session-manager-plugin
295
+ ```
296
+
297
+ 2. Install jq
298
+
299
+ ```bash
300
+ $ brew install jq
301
+ ```
302
+
303
+ In order to exec into running ECS container run the following command:
304
+
305
+ ```bash
306
+ aws ecs execute-command \
307
+ --cluster CLUSTER_NAME \
308
+ --task $(aws ecs list-tasks --cluster CLUSTER_NAME --family TASK_FAMILY_NAME | jq -r '.taskArns[0] | split("/")[2]') \
309
+ --command "/bin/sh" \
310
+ --interactive
311
+ ```
312
+
313
+ Where the `CLUSTER_NAME` is the name of the ECS cluster and `TASK_FAMILY_NAME` is the name of the task family that task belongs to.
314
+
287
315
  ## SSM Connect
288
316
 
289
317
  The [Database](#database) component deploys a database instance inside a private subnet,
@@ -301,6 +329,11 @@ which enables us to connect to the ec2 instance even though it's inside private
301
329
  **Prerequisites**
302
330
 
303
331
  1. Install the [Session Manager plugin](https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-macos-overview.html#install-plugin-macos)
332
+
333
+ ```bash
334
+ $ brew install --cask session-manager-plugin
335
+ ```
336
+
304
337
  2. Generate a new ssh key pair or use the existing one.
305
338
 
306
339
  ```bash
@@ -197,7 +197,7 @@ class WebServer extends pulumi.ComponentResource {
197
197
  .apply(([containerName, image, port, environment, logGroup, region]) => {
198
198
  return JSON.stringify([
199
199
  {
200
- readonlyRootFilesystem: true,
200
+ readonlyRootFilesystem: false,
201
201
  name: containerName,
202
202
  image,
203
203
  essential: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studion/infra-code-blocks",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Studion common infra components",
5
5
  "keywords": [
6
6
  "infrastructure",