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
+57-1Lines changed: 57 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,30 +14,86 @@ The `cdk.json` file tells the CDK Toolkit how to execute your app.
14
14
15
15
## Deploy the stack on AWS
16
16
17
+
17
18
### Configure IAM
18
19
19
20
- Go to AWS Identity and Access Management (IAM)
20
-
- Create a user and as attatch permissions policie `AWSCloudFormationFullAccess` frow AWS console.
21
+
- Create a new policie from JSON
22
+
```json
23
+
{
24
+
"Version": "2012-10-17",
25
+
"Statement": [
26
+
{
27
+
"Effect": "Allow",
28
+
"Action": [
29
+
"sts:AssumeRole"
30
+
],
31
+
"Resource": [
32
+
"arn:aws:iam::*:role/cdk-*"
33
+
]
34
+
},
35
+
{
36
+
"Effect": "Allow",
37
+
"Action": [
38
+
"cloudformation:*"
39
+
],
40
+
"Resource": "*"
41
+
}
42
+
]
43
+
}
44
+
```
45
+
- Save the policie by providing a name (eg: cdk-deploy).
46
+
- Create a user and as attatch permissions policie that you just created frow AWS console.
21
47
- Select the newly created user and go to the `Security credentials` tab.
22
48
- Now on the `Access keys` section, click on the `Create access key` button.
23
49
- Now select use case `Command Line Interface (CLI)` and confirm. Click on the next button.
24
50
- Click `Create access key` button.
25
51
- Now store the `Access key` and `Secret access key`.
26
52
53
+
27
54
### Configure Github Action
28
55
- Go to github repo settings.
29
56
- On the `Security` section click on `Secrets and variable` and then click on `action`.
30
57
- Now click on `New repository secret` and two secret `AWS_ACCESS_KEY_ID` and `AWS_SECRET_KEY` and the value should be the `Access key` and `Secret access key` you got from AWS console.
31
58
- (Optional) Set another secret `AWS_REGION` to specify the deployment region. Default region is `us-east-1`.
32
59
60
+
33
61
### Manually trigger deployment
34
62
- You can triger deployment manually by going to `Action` tab on github repo.
35
63
- The choosing `CDK Deploy` action and clicking on `Run workflow` button.
36
64
65
+
37
66
### Auto-deploy on code push
38
67
If you set up github action then whenever a new code push happen on `master` branch, the deployment will update automatically.
39
68
40
69
70
+
### Lambda api gatway url
71
+
72
+
You can find the deployment url inside github action log.
You can see here there is a url `https://fivtqcifhd.execute-api.us-east-1.amazonaws.com/prod/` inside log output. This is the lambda api gatway URL.
88
+
89
+
You can invoke lambda using this URL.
90
+
91
+
92
+
### Setup custom domain
93
+
94
+
If you want to add a custom domain you can follow this guide: https://medium.com/geekculture/how-to-add-a-custom-domain-to-lambda-functions-1bc0ae639676
95
+
96
+
41
97
### Configure lambda RAM size and timeout setting
42
98
43
99
You can change lambda RAM size and timeout setting inside this file: `lib/audio-processing-stack.ts`
0 commit comments