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
Copy file name to clipboardExpand all lines: README.md
+31-13Lines changed: 31 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,18 +128,26 @@ Before the doing the following, make sure your Daemon is running. If using Colim
128
128
github-repository-archive-script latest b4a1e32ce51b 12 minutes ago 840MB
129
129
```
130
130
131
-
3. Run the image.
131
+
3. Sign in with AWS SSO:
132
+
133
+
```bash
134
+
aws sso login
135
+
```
136
+
137
+
**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. This is essential as the `~/.aws` directory is mounted to the container, so it can use the SSO session for AWS authentication.
138
+
139
+
4. Run the image.
132
140
133
141
```bash
134
142
docker run --platform linux/amd64 -p 9000:8080 \
135
-
-e AWS_ACCESS_KEY_ID=<access_key_id> \
136
-
-e AWS_SECRET_ACCESS_KEY=<secret_access_key> \
137
-
-e AWS_DEFAULT_REGION=<region> \
143
+
-v ~/.aws:/root/.aws \
144
+
-e AWS_PROFILE=github-repository-archive-script \
145
+
-e AWS_DEFAULT_REGION=eu-west-2 \
138
146
-e AWS_SECRET_NAME=<secret_name> \
139
147
-e GITHUB_ORG=<org> \
140
148
-e GITHUB_APP_CLIENT_ID=<client_id> \
141
-
-e S3_BUCKET_NAME=<bucket_name>\
142
-
-e AWS_LAMBDA_FUNCTION_TIMEOUT=300
149
+
-e S3_BUCKET_NAME=<bucket_name>\
150
+
-e AWS_LAMBDA_FUNCTION_TIMEOUT=300 \
143
151
github-repository-archive-script
144
152
```
145
153
@@ -156,7 +164,7 @@ Before the doing the following, make sure your Daemon is running. If using Colim
156
164
157
165
Once the container is running, a local endpoint is created at `localhost:9000/2015-03-31/functions/function/invocations`.
158
166
159
-
4. Check the container is running (Optional).
167
+
5. Check the container is running (Optional).
160
168
161
169
```bash
162
170
docker ps
@@ -169,15 +177,15 @@ Before the doing the following, make sure your Daemon is running. If using Colim
169
177
ca890d30e24d github-repository-archive-script "/lambda-entrypoint.…" 5 seconds ago Up 4 seconds 0.0.0.0:9000->8080/tcp, :::9000->8080/tcp recursing_bartik
170
178
```
171
179
172
-
5. Post to the endpoint (`localhost:9000/2015-03-31/functions/function/invocations`).
180
+
6. Post to the endpoint (`localhost:9000/2015-03-31/functions/function/invocations`).
This allows you to assume the AWS IAM role for the service, enabling the most secure development experience. This also means you will have limited permissions until you exit out of the profile.
218
+
219
+
**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.
220
+
221
+
3. Export the required environment variables:
202
222
203
223
```bash
204
-
export AWS_ACCESS_KEY_ID=<access_key_id>
205
-
export AWS_SECRET_ACCESS_KEY=<secret_access_key>
206
224
export AWS_DEFAULT_REGION=eu-west-2
207
225
export AWS_SECRET_NAME=<secret_name>
208
226
export S3_BUCKET_NAME=<bucket_name>
@@ -212,7 +230,7 @@ To run the Lambda function outside of a container, we need to execute the `handl
212
230
213
231
An explanation of each variable is available within the [containerised instructions](#containerised-recommended).
0 commit comments