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
This user data directs the EC2 instance to join your ECS Cluster. You can optionally include extra user data with `--extra-user-data`; this flag takes a file name as its argument.
342
+
This user data directs the EC2 instance to join your ECS Cluster. You can optionally include extra user data with `--extra-user-data`; this flag takes a file name as its argument.
342
343
The flag can be used multiple times to specify multiple files. Extra user data can be shell scripts or cloud-init directives- see the [EC2 documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) for more information.
343
344
The ECS CLI takes all the User Data, and packs it into a MIME Multipart archive which can be used by cloud-init on the EC2 instance. The ECS CLI even allows existing MIME Multipart archives to be passed in with `--extra-user-data`.
344
345
The CLI will unpack the existing archive, and then repack it into the final archive (preserving all header and content type information). Here is an example of specifying extra user data:
345
346
346
347
```
347
-
ecs-cli up \
348
-
--capability-iam \
349
-
--extra-user-data my-shellscript \
350
-
--extra-user-data my-cloud-boot-hook \
351
-
--extra-user-data my-mime-multipart-archive \
348
+
ecs-cli up \
349
+
--capability-iam \
350
+
--extra-user-data my-shellscript \
351
+
--extra-user-data my-cloud-boot-hook \
352
+
--extra-user-data my-mime-multipart-archive \
352
353
--launch-type EC2
353
354
```
354
355
@@ -850,7 +851,26 @@ OPTIONS:
850
851
--timestamps, -t [Optional] Shows timestamps on each line in the log output.
851
852
```
852
853
853
-
## Using Private Registry Authentication
854
+
### Using FIPS Endpoints
855
+
The ECS-CLI supports using [FIPS endpoints](https://aws.amazon.com/compliance/fips/) for calls to ECR. To ensure you are accessing ECR using FIPS endpoints, use the `--use-fips` flag on the `push`, `pull`, or `images` command. FIPS endpoints are currently available in us-west-1, us-west-2, us-east-1, us-east-2, and in the [GovCloud partition](https://docs.aws.amazon.com/govcloud-us/latest/ug-west/using-govcloud-endpoints.html).
If you want to use privately hosted container images with ECS, the ECS CLI can store your private registry credentials in AWS Secrets Manager and create an IAM role which ECS can use to access the credentials and private images. This allows you to:
856
876
@@ -863,7 +883,7 @@ Using privately hosted images with the ECS CLI is done in two parts:
863
883
1) Create new AWS Secrets Manager secrets and an IAM Task Execution Role with `ecs-cli registry-creds up`
864
884
2) Run `ecs-cli compose` commands to create and run a task definition that includes the new resources
865
885
866
-
### Storing private registry credentials with `ecs-cli registry-creds up`
886
+
####Storing private registry credentials with `ecs-cli registry-creds up`
867
887
868
888
To get started, first create an input file that contains the name of your registry and the credentials needed to access it:
869
889
@@ -876,7 +896,7 @@ registry_credentials:
876
896
my-registry.example.com:
877
897
secrets_manager_arn: # required when using (with no modification) or updating an existing secret
878
898
username: myUserName # required when creating or updating a new secret
879
-
password: ${MY_PASSWORD} # required when creating or updating a new secret
899
+
password: ${MY_PASSWORD} # required when creating or updating a new secret
880
900
kms_key_id: # optional custom KMS Key ID to use to encrypt new secret
881
901
container_names: # required to match credential resources with docker-compose services
882
902
- web
@@ -891,7 +911,7 @@ Other options:
891
911
* If you want to encrypt the AWS Secrets Manager secret for your registry with a custom KMS Key, then add the ARN, ID or Alias of the Key in the `kms_key_id` field. Otherwise, AWS Secrets Manager will use the default key in your account.
892
912
* If you don't want to create or update an IAM Task Execution Role for these secrets, use the `--no-role` flag instead of specifying a role name.
893
913
* If you don't want to generate an output file for use with `compose` or for records purposes, use the `--no-output-file` flag.
894
-
* If you want the output file to be created in a specific directory on your machine, you can specify it with the `--output-dir <value>` flag. Otherwise, the file will be created in your working directory.
914
+
* If you want the output file to be created in a specific directory on your machine, you can specify it with the `--output-dir <value>` flag. Otherwise, the file will be created in your working directory.
895
915
896
916
After creating the input file, run the `registry-creds up` command on the file and pass in the name of the new or existing Task Execution Role you want to use for the secrets:
897
917
@@ -933,7 +953,7 @@ This file contains:
933
953
934
954
We can now use this file with `ecs-cli compose` commands to start a task with images in our private registry.
935
955
936
-
### Using private registry credentials when launching tasks or services
956
+
####Using private registry credentials when launching tasks or services
937
957
938
958
Now that we have an output file that identifies which resources we need to use our private registry, the ECS CLI will incorporate them into our Docker Compose project when we run `ecs-cli compose`.
939
959
@@ -984,7 +1004,6 @@ INFO[0018] Started container... container=bf35a813-dd76-4fe0-b5a2-c1334c2331f4/l
984
1004
985
1005
For more information about using private registries with ECS, see [Private Registry Authentication for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html).
0 commit comments