-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda-sam
More file actions
33 lines (25 loc) · 811 Bytes
/
lambda-sam
File metadata and controls
33 lines (25 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-hello-world.html
# Step 1 - Download a sample application
```
sam init --runtime python3.7
#Select 1/1/enter/1
```
# Step 2 - Build your application
```
cd sam-app
sam build
```
# Step 3 - Test the function
```
sam local invoke "HelloWorldFunction" -e events/event.json
sam local start-api
curl http://127.0.0.1:3000/hello
```
# Step 4 - Package your application
```
sam package --output-template-file packaged.yaml --s3-bucket aws-devops-course-stephane --region eu-west-1 --profile aws-devops
```
# Step 5 - Deploy your application
```
sam deploy --template-file packaged.yaml --capabilities CAPABILITY_IAM --stack-name aws-sam-getting-started --region eu-west-1 --profile aws-devops
```