Skip to content

Commit fb641eb

Browse files
committed
chore: update README
1 parent 0ea93d9 commit fb641eb

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,40 @@ To run the Lambda function outside of a container, we need to execute the `handl
9595

9696
**Please Note:** If uncommenting the above in `main.py`, make sure you re-comment the code _before_ pushing back to GitHub.
9797

98-
2. Export the required environment variables:
98+
2. Sign in with AWS SSO, and export the correct profile for this service:
99+
100+
```bash
101+
aws sso login
102+
103+
export AWS_PROFILE=github-copilot-usage-lambda
104+
```
105+
106+
This allows you to assume the AWS IAM role for service, enabling the most secure development experience. This also means you will have limited permissions until you exit out of the profile.
107+
108+
**Note:** See the Developer Onboarding Guide on the "Using AWS SSO for Local Development" page on Confluence to set up service profile selection on your local machine.
109+
110+
3. Export the required environment variables:
99111

100112
```bash
101-
export AWS_ACCESS_KEY_ID=<aws_access_key_id>
102-
export AWS_SECRET_ACCESS_KEY=<aws_secret_access_key>
103113
export AWS_DEFAULT_REGION=eu-west-2
104114
export AWS_SECRET_NAME=<aws_secret_name>
115+
export AWS_ACCOUNT_NAME=<sdp-dev/sdp-prod>
105116
export GITHUB_ORG=ONSDigital
106117
export GITHUB_APP_CLIENT_ID=<github_app_client_id>
107-
export AWS_ACCOUNT_NAME=<sdp-dev/sdp-prod>
108118
```
109119

110-
3. Run the script.
120+
4. Run the script.
111121

112122
```bash
113123
python3 src/main.py
114124
```
115125

126+
5. To exit the profile:
127+
128+
```bash
129+
unset AWS_PROFILE
130+
```
131+
116132
### Running in a container
117133

118134
1. Build a Docker Image

0 commit comments

Comments
 (0)