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

Commit 2fbecea

Browse files
author
CodingNagger
committed
Further Makefile & README.md adjustments
1 parent db652d0 commit 2fbecea

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ LAMBDA_HANDLER?=$(SWIFT_EXECUTABLE).helloWorld
3030
# LAMBDA_FUNCTION_NAME=S3Test
3131
# LAMBDA_HANDLER=$(SWIFT_EXECUTABLE).getObject
3232

33+
# AWS Configuration
34+
IAM_ROLE_NAME?=lambda_sprinter_basic_execution
35+
AWS_PROFILE?=default
36+
AWS_BUCKET?=aws-lambda-swift-sprinter
37+
3338
# Internals
3439
LAMBDA_ZIP=lambda.zip
3540
SHARED_LIBS_FOLDER=swift-shared-libs
@@ -38,7 +43,6 @@ ROOT_BUILD_PATH=./.build
3843
LAYER_BUILD_PATH=$(ROOT_BUILD_PATH)/layer
3944
LAMBDA_BUILD_PATH=$(ROOT_BUILD_PATH)/lambda
4045
TMP_BUILD_PATH=$(ROOT_BUILD_PATH)/tmp
41-
IAM_ROLE_NAME=lambda_sprinter_basic_execution
4246
DATETIME=$(shell date +'%y%m%d-%H%M%S')
4347

4448
# use this for local development
@@ -49,10 +53,6 @@ DOCKER_PROJECT_PATH=aws-lambda-swift-sprinter/$(SWIFT_PROJECT_PATH)
4953
# MOUNT_ROOT=$(shell pwd)
5054
# DOCKER_PROJECT_PATH=$(SWIFT_PROJECT_PATH)
5155

52-
# AWS Configuration
53-
AWS_PROFILE?=default
54-
AWS_BUCKET?=aws-lambda-swift-sprinter
55-
5656
swift_test:
5757
docker run \
5858
--rm \

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ make invoke_lambda \
171171
| Key | Usage | Default |
172172
| --- | --- | --- |
173173
| AWS_PROFILE | An AWS AIM profile you create to authenticate to your account. | default |
174+
| IAM_ROLE_NAME | The execution role created that will be assumed by the Lambda. | lambda_sprinter_basic_execution |
175+
| AWS_BUCKET | The AWS S3 bucket where the layer and lambdas zip files get uploaded. | aws-lambda-swift-sprinter |
174176
| SWIFT_VERSION | Version of Swift used / Matches Dockerfile location too from `docker/` folder. | 5.1 |
175177
| LAYER_VERSION | Version of the Swift layer that will be created and uploaded for the Lambda to run on. | 5-1 |
176178
| SWIFT_EXECUTABLE | Name of the binary file. | HelloWorld |
@@ -215,6 +217,8 @@ There are many ways to achieve a lambda deployment (AWS Console, SAM, CloudForma
215217
- an AWS account for test purpose.
216218
- aws cli: Install the aws cli. Here the [instructions](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html).
217219

220+
- If you want to deploy your lambdas and layers using S3 you need to make sure the bucket in the Makefile already exists. If it doesn't you can create it using the command `make create_s3_bucket` which will use the value of the variable `AWS_BUCKET` as a name.
221+
218222
- if your AWS account it doesn't have admin priviledges:
219223
- Review(*) the policy contained in the file **LambdaDeployerPolicyExample.json**
220224
- Attach the policy to your user. [Here](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html) is the official documentation.
@@ -313,14 +317,6 @@ make update_lambda_with_s3
313317
make update_lambda
314318
```
315319

316-
#### 6) Create bucket
317-
318-
You may create a bucket if you wish to use the S3 options to upload lambdas and layers using the command below:
319-
320-
```console
321-
make create_s3_bucket
322-
```
323-
324320
# Contributions
325321

326322
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)