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
If you need to send environment variables to agents, you can use the [--with-env-vars](/ci/reference/nx-cloud-cli#withenvvars-nx-agents-only) flag on the `nx-cloud start-ci-run` command. You can pass a specific list of environment variables like this:
424
424
@@ -555,7 +555,7 @@ Nx Agents have [corepack enabled](https://nodejs.org/api/corepack.html#corepack)
555
555
Currently, corepack [only supports yarn or pnpm](https://nodejs.org/api/corepack.html#supported-package-managers) as package managers. If you need to use a specific npm version, you will need to create a custom launch template and install the specific npm version, i.e. `npm install -g npm@<version>`
556
556
{%/callout %}
557
557
558
-
## Installing Packages on Nx Agents
558
+
## Installing Packages
559
559
560
560
You can use `apt` to install popular linux packages. This is helpful in streamlining setting up various toolchains needed for your workspace.
561
561
@@ -576,6 +576,66 @@ launch-templates:
576
576
If you're trying to install a package that isn't available on `apt`, check that packages install steps for Debian base linux. Usually there are a handful of installation scripts that can be used [similar to `nvm`](#custom-node-version)
577
577
{% /callout %}
578
578
579
+
## AWS CLI
580
+
581
+
First, define the environment variables on your main agent, where you call [`nx-cloud start-ci-run`](/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun). Pass the same environment variables to your agents via the [`--with-env-vars` flag](/ci/reference/nx-cloud-cli#withenvvars-nx-agents-only).
582
+
583
+
Minimally the `AWS_REGION` (or `AWS_DEFAULT_REGION`), `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY` environment variables are required.
584
+
585
+
{% callout type="check" title="OIDC Provider" %}
586
+
If using an [OIDC provider](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html), e.g. the [AWS GitHub Action recommended setup](https://github.com/aws-actions/configure-aws-credentials?tab=readme-ov-file#using-this-action), then the environment variables are automatically configured for you after authentication to AWS. Since the credentials created for with OIDC provider flow are temporary, you'll need to pass the `AWS_SESSION_TOKEN` environment variable to your agents.
587
+
588
+
{% /callout %}
589
+
590
+
{% tabs %}
591
+
{% tab label="Pre-Built Step" %}
592
+
593
+
Using the pre-built step simplifies and provides debugging checks to make sure the AWS CLI is properly authenticated to AWS before continuing. The step is recommended for most use cases.
# no additional inputs required, as all configuration is via environment variables via --with-env-vars
604
+
```
605
+
606
+
{% /tab %}
607
+
{% tab label="Manual Installation" %}
608
+
609
+
Manual installation follows [installing the AWS CLI using the official directions](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). In order to decompress the installation archive, you'll need to install the `unzip` package in your step.
610
+
Manual installation is helpful if a custom installation setup is required.
611
+
It is helpful to run `aws sts get-caller-identity` command to make sure you're properly authenticated to AWS before proceeding
# run installer, default location is already in the PATH
627
+
# if installing in a custom location,
628
+
# then update the $PATH like `PATH=$PATH:[extra-path-items] >> $NX_CLOUD_ENV`
629
+
sudo ./aws/install
630
+
# print AWS CLI version to verify command is avaiable
631
+
aws --version
632
+
# verify credentials to AWS is working
633
+
aws sts get-caller-identity
634
+
```
635
+
636
+
{% /tab %}
637
+
{% /tabs %}
638
+
579
639
## Dynamic Changesets
580
640
581
641
NxCloud can calculate how big your pull request is based on how many projects in your workspace it affects. You can then configure Nx Agents to dynamically use a different number of agents based on your changeset size.
0 commit comments