Skip to content

Commit 71587ea

Browse files
authored
Document configuration variables in deploy.sh (#97)
1 parent aa6468b commit 71587ea

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Examples/LambdaFunctions/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ Steps to deploy this sample to AWS Lambda using the AWS CLI:
2020
./scripts/deploy.sh
2121
```
2222

23-
Note: This script assumes you have AWS CLI installed and credentials setup in `~/.aws/credentials`.
23+
Notes:
24+
- This script assumes you have AWS CLI installed and credentials setup in `~/.aws/credentials`.
25+
- The default lambda function name is `SwiftSample`. You can specify a different one updating `lambda_name` in `deploy.sh`
26+
- Update `s3_bucket=swift-lambda-test` in `deploy.sh` before running (AWS S3 buckets require a unique global name)
27+
- Both lambda function and S3 bucket must exist before deploying for the first time.
2428

2529
### Deployment instructions using AWS SAM (Serverless Application Model)
2630

Examples/LambdaFunctions/scripts/deploy.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515

1616
set -eu
1717

18+
# Lambda Function name (must exist in AWS Lambda)
1819
lambda_name=SwiftSample
20+
21+
# S3 bucket name to upload zip file (must exist in AWS S3)
1922
s3_bucket=swift-lambda-test
23+
2024
executables=( $(swift package dump-package | sed -e 's|: null|: ""|g' | jq '.products[] | (select(.type.executable)) | .name' | sed -e 's|"||g') )
2125

2226
if [[ ${#executables[@]} = 0 ]]; then

0 commit comments

Comments
 (0)