Skip to content

Commit 4aa2401

Browse files
Merge pull request #1061 from NHSDigital/feature/axkr1-NRL-1669-readme-updates
NRL-1669 Add instructions to set-up AWS CLI access and client certs
2 parents 2350115 + adc1a22 commit 4aa2401

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ truststore-build-ca: check-warn ## Build a CA (Certificate Authority)
201201
truststore-build-cert: check-warn ## Build a certificate
202202
@./scripts/truststore.sh build-cert "$(CA_NAME)" "$(CERT_NAME)" "$(CERT_SUBJECT)"
203203

204+
truststore-pull-all: check-warn ## Pull all certificates
205+
@./scripts/truststore.sh pull-all "$(ENV)"
206+
204207
truststore-pull-server: check-warn ## Pull a server certificate
205208
@./scripts/truststore.sh pull-server "$(ENV)"
206209

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,36 @@ Then install all the dependency packages with:
3737
make configure
3838
```
3939

40+
### Set up AWS CLI access
41+
42+
There are several ways to set up your AWS CLI access. The recommended way is to use [granted](https://docs.commonfate.io/granted/getting-started). Follow the instructions on their website to install and configure `granted`.
43+
44+
One of the gotchas with using `granted` is that you need to ensure that you source the environment variables into your shell session. You can do this by running:
45+
46+
```
47+
source assume <profile>
48+
```
49+
50+
Where `<profile>` is one of the profiles which should be in your `~/.aws/config`. You can customize the profile names to your liking.
51+
52+
From here on, you can use the AWS CLI as normal and run commands that need AWS access on that terminal session.
53+
54+
As a short guideline about profiles to assume for a typical workflow:
55+
56+
- Assume mgmt account for stack specific terraform deployment as indicated in `terraform/infrastructure/README.md`.
57+
- Assume the specific environment for running feature tests against that environment.
58+
59+
### Set up NRLF certificates
60+
61+
In order to execute make commands that need AWS access, you will need to pull the NRLF certificates.
62+
In order to do this, make sure you have AWS CLI installed and configured, then run:
63+
64+
```
65+
make ENV=env truststore-pull-all
66+
```
67+
68+
Where `env` is one of `dev`, `qa` , `int`, `ref` or `prod`.
69+
4070
## Getting Started
4171

4272
To build packages:

0 commit comments

Comments
 (0)