File tree Expand file tree Collapse file tree 3 files changed +25
-11
lines changed Expand file tree Collapse file tree 3 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 25
25
python-version : ' 3.12'
26
26
27
27
- name : Install AWS SAM CLI
28
- run : pip install aws-sam-cli
28
+ run : |
29
+ cd /tmp
30
+ wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip
31
+ unzip aws-sam-cli-linux-x86_64.zip -d aws-sam-cli-linux-x86_64
32
+ sudo ./aws-sam-cli-linux-x86_64/install
33
+ sam --version
29
34
30
35
- name : Test deploy.sh script
31
36
run : ./deploy.sh
35
40
mv .aws-sam/build/BedrockAccessGatewayLayer/python/* ./app
36
41
(cd app && ./run.sh &)
37
42
timeout 30 bash -c 'while ! nc -z localhost 8000; do sleep 1; done'
38
- curl localhost:8000/health | jq
39
- curl localhost:8000/api/v1/models -H 'Authorization: Bearer bedrock' | jq
43
+ curl localhost:8000/health -s | jq
44
+ curl localhost:8000/api/v1/models -s - H 'Authorization: Bearer bedrock' | jq
40
45
41
46
test-cloudshell-build :
42
47
runs-on : ubuntu-latest
@@ -48,12 +53,18 @@ jobs:
48
53
49
54
steps :
50
55
- name : Install dependencies
51
- run : |
52
- yum install -y sudo python3-pip tar git
53
- pip3 install aws-sam-cli
56
+ run : yum install -y sudo python3-pip tar git wget unzip jq
54
57
55
58
- name : Checkout code
56
59
uses : actions/checkout@v3
57
60
61
+ - name : Install AWS SAM CLI
62
+ run : |
63
+ cd /tmp
64
+ wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip
65
+ unzip aws-sam-cli-linux-x86_64.zip -d aws-sam-cli-linux-x86_64
66
+ sudo ./aws-sam-cli-linux-x86_64/install
67
+ sam --version
68
+
58
69
- name : Test deploy.sh script
59
70
run : ./deploy.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
export PYTHON_VERSION=3.12
4
- export SAM_CLI_TELEMETRY=0
4
+ export SAM_CLI_TELEMETRY=0
5
5
6
6
# Parse command line arguments
7
7
while [[ $# -gt 0 ]]; do
29
29
30
30
sam build $USE_CONTAINER
31
31
32
+ AWS_REGION=${AWS_REGION:- us-east-1}
33
+
34
+ sam validate --region $AWS_REGION --lint
35
+
32
36
if [[ ! -z " $CI " ]]; then
33
37
exit
34
38
fi
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Parameters:
29
29
Default : amazon.nova-premier-v1:0
30
30
AllowedPattern : " ([a-z]+\\ .)?[a-z0-9-]+\\ .[a-z0-9-]+(:\\ d+)?"
31
31
ConstraintDescription : " Must be a valid Bedrock model ID, cross regioninference profiles are also supported (e.g., us.amazon.nova-premier-v1:0)"
32
- DEBUG :
32
+ Debug :
33
33
Type : String
34
34
Description : " Enable debug mode"
35
35
Default : " false"
@@ -45,13 +45,12 @@ Metadata:
45
45
Parameters :
46
46
- LambdaAdapterLayerVersion
47
47
- PythonRuntime
48
- - Architecture
49
48
- Label :
50
49
default : " Application Configuration"
51
50
Parameters :
52
51
- ApiKey
53
52
- DefaultModel
54
- - DEBUG
53
+ - Debug
55
54
56
55
Globals :
57
56
Function :
@@ -85,7 +84,7 @@ Resources:
85
84
AWS_LWA_INVOKE_MODE : RESPONSE_STREAM
86
85
# Align with `app/api/app.py` in the `uvicorn.run` line
87
86
AWS_LWA_PORT : 8000
88
- DEBUG : !Ref DEBUG
87
+ DEBUG : !Ref Debug
89
88
DEFAULT_MODEL : !Ref DefaultModel
90
89
ENABLE_CROSS_REGION_INFERENCE : ' true'
91
90
Layers :
You can’t perform that action at this time.
0 commit comments