File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1
1
To set up an AWS account for running integration tests on GitHub:
2
2
3
+ 1 . Deploy least-privilege IAM roles:
4
+
3
5
``` bash
4
6
aws cloudformation deploy \
5
7
--template-file integ-test-authentication.yaml \
@@ -14,3 +16,33 @@ cdk bootstrap \
14
16
aws://$AWS_ACCOUNT_ID /us-east-2 \
15
17
--cloudformation-execution-policies " arn:aws:iam::$AWS_ACCOUNT_ID :policy/mcp-lambda-integ-test-cdk-cfn-execution"
16
18
```
19
+
20
+ 2 . Delegate a sub-domain for the auth stack:
21
+
22
+ https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html
23
+
24
+ 3 . Deploy the auth stack:
25
+
26
+ ``` bash
27
+ cd ../examples/servers/auth/
28
+
29
+ sed -i ' s/liguori.people.aws.dev/mcp-lambda-integ-tests.liguori.people.aws.dev/g' lib/mcp-auth.ts
30
+
31
+ npm install
32
+
33
+ npm run build
34
+
35
+ AWS_ACCOUNT_ID=$( aws sts get-caller-identity --query " Account" --output text)
36
+
37
+ aws iam attach-role-policy \
38
+ --role-name cdk-hnb659fds-cfn-exec-role-$AWS_ACCOUNT_ID -us-east-2 \
39
+ --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
40
+
41
+ cdk deploy --app ' node lib/mcp-auth.js'
42
+
43
+ aws iam detach-role-policy \
44
+ --role-name cdk-hnb659fds-cfn-exec-role-$AWS_ACCOUNT_ID -us-east-2 \
45
+ --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
46
+
47
+ ./sync-cognito-user-password.sh
48
+ ```
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ main() {
137
137
138
138
print_info " Password sync completed successfully!"
139
139
print_info " User '$USERNAME ' can now sign in with the credentials from Secrets Manager."
140
- print_warning " To retrieve credentials: aws secretsmanager get-secret-value --secret-id '$SECRET_ARN ' --query SecretString --output text"
140
+ print_info " To retrieve credentials: aws secretsmanager get-secret-value --secret-id '$SECRET_ARN ' --query SecretString --output text"
141
141
}
142
142
143
143
# Run main function
You can’t perform that action at this time.
0 commit comments