Skip to content

Commit dce6fa2

Browse files
committed
add section 4
1 parent 762b2aa commit dce6fa2

25 files changed

+38
-58
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# shellcheck disable=all
2-
31
swift package archive --allow-network-connections docker
4-
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
# shellcheck disable=all
2-
31
swift package archive --allow-network-connections docker
42

53
-------------------------------------------------------------------------
6-
building "squarenumberlambda" in docker
4+
building "palindrome" in docker
75
-------------------------------------------------------------------------
86
updating "swift:amazonlinux2" docker image
97
amazonlinux2: Pulling from library/swift
10-
Digest: sha256:5b0cbe56e35210fa90365ba3a4db9cd2b284a5b74d959fc1ee56a13e9c35b378
11-
Status: Image is up to date for swift:amazonlinux2
8+
Digest: sha256:df06a50f70e2e87f237bd904d2fc48195742ebda9f40b4a821c4d39766434009
9+
Status: Image is up to date for swift:amazonlinux2
1210
docker.io/library/swift:amazonlinux2
13-
building "SquareNumberLambda"
11+
building "PalindromeLambda"
12+
[0/1] Planning build
1413
Building for production...
15-
...
14+
[0/2] Write swift-version-24593BA9C3E375BF.txt
15+
Build of product 'PalindromeLambda' complete! (1.91s)
1616
-------------------------------------------------------------------------
17-
archiving "SquareNumberLambda"
17+
archiving "PalindromeLambda"
1818
-------------------------------------------------------------------------
1919
1 archive created
20-
* SquareNumberLambda at /Users/YourUserName/SquareNumberLambda/.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/SquareNumberLambda/SquareNumberLambda.zip
21-
20+
* PalindromeLambda at /Users/sst/Palindrome/.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/PalindromeLambda/PalindromeLambda.zip
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# shellcheck disable=all
2-
31
swift package archive --allow-network-connections docker
42

53
-------------------------------------------------------------------------
6-
building "squarenumberlambda" in docker
4+
building "palindrome" in docker
75
-------------------------------------------------------------------------
86
updating "swift:amazonlinux2" docker image
97
amazonlinux2: Pulling from library/swift
10-
Digest: sha256:5b0cbe56e35210fa90365ba3a4db9cd2b284a5b74d959fc1ee56a13e9c35b378
11-
Status: Image is up to date for swift:amazonlinux2
8+
Digest: sha256:df06a50f70e2e87f237bd904d2fc48195742ebda9f40b4a821c4d39766434009
9+
Status: Image is up to date for swift:amazonlinux2
1210
docker.io/library/swift:amazonlinux2
13-
building "SquareNumberLambda"
11+
building "PalindromeLambda"
12+
[0/1] Planning build
1413
Building for production...
15-
...
14+
[0/2] Write swift-version-24593BA9C3E375BF.txt
15+
Build of product 'PalindromeLambda' complete! (1.91s)
1616
-------------------------------------------------------------------------
17-
archiving "SquareNumberLambda"
17+
archiving "PalindromeLambda"
1818
-------------------------------------------------------------------------
1919
1 archive created
20-
* SquareNumberLambda at /Users/YourUserName/SquareNumberLambda/.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/SquareNumberLambda/SquareNumberLambda.zip
21-
20+
* PalindromeLambda at /Users/sst/Palindrome/.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/PalindromeLambda/PalindromeLambda.zip
2221

23-
cp .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/SquareNumberLambda/SquareNumberLambda.zip ~/Desktop
22+
cp .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/PalindromeLambda/PalindromeLambda.zip ~/Desktop
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# shellcheck disable=all
2-
31
aws --version
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# shellcheck disable=all
2-
3-
#
41
# --region the AWS Region to send the command
52
# --function-name the name of your function
63
# --cli-binary-format tells the cli to use raw data as input (default is base64)
74
# --payload the payload to pass to your function code
85
# result.json the name of the file to store the response from the function
9-
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# shellcheck disable=all
2-
3-
#
41
# --region the AWS Region to send the command
52
# --function-name the name of your function
63
# --cli-binary-format tells the cli to use raw data as input (default is base64)
@@ -9,8 +6,8 @@
96

107
aws lambda invoke \
118
--region us-west-2 \
12-
--function-name SquaredNumberLambda \
9+
--function-name PalindromeLambda \
1310
--cli-binary-format raw-in-base64-out \
14-
--payload '{"number":3}' \
11+
--payload '{"text": "Was it a car or a cat I saw?"}' \
1512
result.json
1613

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/04-03-03-lambda-invoke.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# shellcheck disable=all
2-
3-
#
41
# --region the AWS Region to send the command
52
# --function-name the name of your function
63
# --cli-binary-format tells the cli to use raw data as input (default is base64)
@@ -9,9 +6,9 @@
96

107
aws lambda invoke \
118
--region us-west-2 \
12-
--function-name SquaredNumberLambda \
9+
--function-name PalindromeLambda \
1310
--cli-binary-format raw-in-base64-out \
14-
--payload '{"number":3}' \
11+
--payload '{"text": "Was it a car or a cat I saw?"}' \
1512
result.json
1613

1714
{

Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/04-03-04-lambda-invoke.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# shellcheck disable=all
2-
3-
#
41
# --region the AWS Region to send the command
52
# --function-name the name of your function
63
# --cli-binary-format tells the cli to use raw data as input (default is base64)
@@ -9,9 +6,9 @@
96

107
aws lambda invoke \
118
--region us-west-2 \
12-
--function-name SquaredNumberLambda \
9+
--function-name PalindromeLambda \
1310
--cli-binary-format raw-in-base64-out \
14-
--payload '{"number":3}' \
11+
--payload '{"text": "Was it a car or a cat I saw?"}' \
1512
result.json
1613

1714
{
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# shellcheck disable=all
2-
3-
#
41
# --region the AWS Region to send the command
52
# --function-name the name of your function
63
# --cli-binary-format tells the cli to use raw data as input (default is base64)
@@ -9,9 +6,9 @@
96

107
aws lambda invoke \
118
--region us-west-2 \
12-
--function-name SquaredNumberLambda \
9+
--function-name PalindromeLambda \
1310
--cli-binary-format raw-in-base64-out \
14-
--payload '{"number":3}' \
11+
--payload '{"text": "Was it a car or a cat I saw?"}' \
1512
result.json
1613

1714
{
@@ -20,5 +17,5 @@ aws lambda invoke \
2017
}
2118

2219
cat result.json
23-
{"result":9}
20+
{"text":"Was it a car or a cat I saw?","isPalindrome":true,"message":"Your text is a palindrome"}
2421

Loading

0 commit comments

Comments
 (0)