|
1 | 1 | # aws-lambda-swift-sprinter |
2 | 2 |
|
3 | | -[](https://swift.org/download/) [](https://swift.org/download/)   |
| 3 | +[](https://swift.org/download/) [](https://swift.org/download/)   |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
@@ -173,8 +173,8 @@ make invoke_lambda \ |
173 | 173 | | AWS_PROFILE | An AWS AIM profile you create to authenticate to your account. | default | |
174 | 174 | | IAM_ROLE_NAME | The execution role created that will be assumed by the Lambda. | lambda_sprinter_basic_execution | |
175 | 175 | | AWS_BUCKET | The AWS S3 bucket where the layer and lambdas zip files get uploaded. | aws-lambda-swift-sprinter | |
176 | | -| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1 | |
177 | | -| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1 | |
| 176 | +| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1.1 | |
| 177 | +| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1-1 | |
178 | 178 | | SWIFT_EXECUTABLE | Name of the binary file. | HelloWorld | |
179 | 179 | | SWIFT_PROJECT_PATH | Path to your Swift project. | Examples/HelloWorld | |
180 | 180 | | LAMBDA_FUNCTION_NAME | Display name of your Lambda in AWS. | HelloWorld | |
@@ -317,6 +317,29 @@ make update_lambda_with_s3 |
317 | 317 | make update_lambda |
318 | 318 | ``` |
319 | 319 |
|
| 320 | +# Update the lambda layer |
| 321 | + |
| 322 | +The docker image could require security updates or could require updates. |
| 323 | + |
| 324 | +To patch the lambda with a new layer: |
| 325 | + |
| 326 | +1. Rebuild the docker image |
| 327 | +``` |
| 328 | +make docker_build |
| 329 | +``` |
| 330 | +2. package the layer |
| 331 | +``` |
| 332 | +make package_layer |
| 333 | +``` |
| 334 | +3. upload the layer to AWS |
| 335 | +``` |
| 336 | +make upload_lambda_layer |
| 337 | +``` |
| 338 | +4. update the lambda |
| 339 | +``` |
| 340 | +make update_lambda |
| 341 | +``` |
| 342 | + |
320 | 343 | # Contributions |
321 | 344 |
|
322 | 345 | 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