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
+81-49Lines changed: 81 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ Highlights of this project include:
44
44
45
45
# Getting Started
46
46
47
-
## 1. Install dependencies & deploy
47
+
## 1. Install dependencies
48
48
49
49
**Install Serverless Framework**
50
50
@@ -54,31 +54,81 @@ npm i -g serverless
54
54
55
55
**Install NPM dependencies**
56
56
57
-
This runs `npm install` in each service directory.
57
+
This project is structured as a monorepo with multiple services. Each service
58
+
has its own `package.json` file, so you must install the dependencies for each
59
+
service. Running `npm install` in the root directory will install the
60
+
dependencies for all services.
58
61
59
62
```
60
63
npm install
61
64
```
62
65
66
+
**Setup AWS Credentials**
67
+
68
+
If you haven't already, setup your AWS Credentials. You can follow the [AWS Credentials doc](https://www.serverless.com/framework/docs/providers/aws/guide/credentials)
69
+
for step-by-step instructions.
70
+
71
+
## 2. Enable AWS Bedrock Models
72
+
73
+
This example requires the `meta.llama3-70b-instruct-v1:0` AWS Bedrock
74
+
Model to be enabled. By default, AWS does not enable these models, you must go
75
+
to the [AWS Console](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/models)
76
+
and individually request access to the AI Models.
77
+
78
+
There is no cost to enable the models, but you must request access to use them.
79
+
80
+
Upon request, it may take a few minutes for AWS to enable the model. Once they
81
+
are enabled, you will receive an email from AWS confirming the model is enabled.
82
+
83
+
## 3. Deploy & start developing
84
+
85
+
Now you are ready to deploy the services. This will deploy all the services
86
+
to your AWS account. You can deploy the services to the `default` stage, which
87
+
is the default stage for development.
88
+
63
89
**Deploy the services**
64
90
65
91
```
66
92
serverless deploy
67
93
```
68
94
69
-
**NOTE**: This example requires the `meta.llama3-70b-instruct-v1:0` AWS Bedrock
70
-
Model to be enabled. By default, AWS does not enable these models, you must go
71
-
to the [AWS Console](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/models)
72
-
and individually request access to the AI Models.
95
+
At this point the service is live. When running the `serverless deploy` command,
96
+
you will see the output of the services that were deployed. One of those
97
+
services is the `web` service, which is the website service. To view the app,
98
+
go to the URL in the `endpoint: ANY - ` section for the `web` service.
99
+
100
+
```
101
+
Deploying "web" to stage "dev" (us-east-1)
102
+
103
+
endpoint: ANY - https://ps5s7dd634.execute-api.us-east-1.amazonaws.com
104
+
functions:
105
+
app: web-dev-app (991 kB)
106
+
107
+
```
108
+
109
+
Once you start developing it is easier to run the service locally for faster
110
+
iteration. We recommend using [Serverless Dev Mode](https://www.serverless.com/framework/docs/providers/aws/cli-reference/dev).
111
+
You can run Dev Mode for individual services. This emulates Lambda locally and
112
+
proxies requests to the real service.
113
+
114
+
```
115
+
serverless auth dev
116
+
```
117
+
118
+
Once done, you can redeploy individual services using the `serverless` command
119
+
with the service name.
120
+
121
+
```
122
+
serverless auth deploy
123
+
```
73
124
74
-
At this point you will have a functional dev service deploy. This `dev` stage
75
-
does not use a custom domain name, and uses a placeholder shared secret for JWT
76
-
token authentication.
125
+
## 4. Prepare for production
77
126
78
-
The subsequent steps will help you setup the custom domain name, shared secret,
79
-
and development workflow you can use in production.
127
+
Now that the app is up and running in a development environment, lets get it
128
+
ready for production by setting up a custom domain name, and setting a new
129
+
shared secret for JWT token authentication.
80
130
81
-
##2. Setup Custom Domain Name (optional)
131
+
###Setup Custom Domain Name (optional)
82
132
83
133
This project is configured to use custom domain names. For non `prod`
84
134
deployments this is disabled. Deployments to `prod` are designed to use a custom
0 commit comments