Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 991207f

Browse files
Add Manual deployment from AWS Console in README
1 parent c02ec3b commit 991207f

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,46 @@ make upload_lambda_layer
358358
make update_lambda
359359
```
360360

361+
# Manual deployment from AWS Console
362+
363+
### Requirements:
364+
- Use MacOS or Linux
365+
- Install [Docker](https://docs.docker.com/docker-for-mac/install/)
366+
- Clone the repo `git clone https://github.com/swift-sprinter/aws-lambda-swift-sprinter.git`
367+
368+
### Build:
369+
- From command line run `make docker_build`
370+
- From command line run `make package_layer`
371+
- From command line run `make package_lambda`
372+
373+
### Configure:
374+
- Go to `AWS Lambda -> Layers` in AWS Console and create a new layer from scratch
375+
- Enter layer name "swift-lambda-runtime-5-1-1"
376+
- Upload the zip file `build/swift-lambda-runtime-5-1-1.zip`
377+
- Leave "Compatible runtimes" empty.
378+
- Click "Create"
379+
- Copy the `arn` from the created layer, it's required to set up the lambda.
380+
- Go to `AWS Lambda` in AWS Console and create a new function from scratch
381+
- Enter function name "benchmark-swift-hello" and select "Provide your own bootstrap" as runtime
382+
- Choose the execution role created above
383+
- Upload the zip file created with function code, it can be found under `build/lambda.zip`
384+
- Input "HelloWorld.helloWorld" in "Handler" (`Executable.Handler`)
385+
- Click "Layers"
386+
- Click "Add Layer"
387+
- Click "Provide a layer version"
388+
- Add the `arn` of the layer you have uploaded previously.
389+
- Click "Add"
390+
- Click "Save"
391+
392+
### Test:
393+
- Test the function by clicking `Test` in the top right corner and add the following event:
394+
```
395+
{
396+
"name": "Swift-Sprinter"
397+
}
398+
```
399+
- Give a name to the event, save and then test it.
400+
361401
# Contributions
362402

363403
Contributions are more than welcome! Follow [this guide](https://github.com/swift-sprinter/aws-lambda-swift-sprinter/blob/master/CONTRIBUTING.md) to contribute.

0 commit comments

Comments
 (0)