Skip to content

Commit 52df259

Browse files
committed
tweaks to wording on lambda 3.6 post for clarity
1 parent 8075ed1 commit 52df259

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

content/posts/170429-python-3-6-aws-lambda.markdown

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ comes in to API Gateway or a new file is uploaded to
1515
[AWS S3](https://aws.amazon.com/s3/) then AWS Lambda can execute a function
1616
to respond to that API call or manipulate the file on S3.
1717

18-
AWS Lambdas are not related to the Python languages' `lambda` expressions.
19-
The AWS Lambda name just happens to collide with the the `lambda` keyword
20-
name in Python that is used to create anonymous functions.
18+
AWS Lambdas are not related to the Python languages' `lambda` expressions,
19+
which are used to create anonymous functions. The AWS Lambda name just
20+
happens to collide with the the `lambda` keyword's name.
2121

2222
Let's learn how to quickly write and run a Lambda function to execute
2323
basic Python 3.6 code which uses environment variables as input.
@@ -37,23 +37,18 @@ cover that in this post.
3737
If using Python 2 is still your jam rather than Python 3, take a look at
3838
[this other post which shows how to execute Python 2.7 code on AWS Lambda](/blog/aws-lambda-python-2-7.html).
3939

40-
Sign up for a new [Amazon Web Services account](https://aws.amazon.com/)
41-
(which provides a generous free tier), or use your existing AWS account.
42-
4340

4441
## First Steps with AWS Lambda
45-
In your web browser go to the
46-
[AWS Lambda landing page](https://aws.amazon.com/lambda/).
47-
Log in to your account, or sign up for a new account which
48-
comes with a free tier so you don't have to pay.
42+
Sign up for a new [Amazon Web Services account](https://aws.amazon.com/),
43+
which provides a generous free tier, or use your existing AWS account.
4944

5045
<img src="/img/170429-aws-lambda-python-3-6/aws-amazon-com.jpg" width="100%" class="technical-diagram img-rounded" alt="AWS Lambda landing and sign in screen.">
5146

5247
After signing up a few tutorials may pop up, but skip past them and
5348
go to the main Console. AWS has tons of services, with more being added
5449
every month, so using the search box is the best way to get around.
5550
Select the search text box, enter "lambda" and select "Lambda" to get to
56-
the right starting page.
51+
the Lambda starting page.
5752

5853
<img src="/img/170429-aws-lambda-python-3-6/search-for-lambda.jpg" width="100%" class="technical-diagram img-rounded bordered" alt="Search for lambda in the dashboard text box.">
5954

@@ -63,16 +58,17 @@ will appear.
6358
<img src="/img/170429-aws-lambda-python-3-6/select-blueprint.jpg" width="100%" class="technical-diagram img-rounded bordered" alt="The Select Blueprint Lambda screen.">
6459

6560
Select "Blank Function" and the "Configure triggers" page will come up.
66-
It's non-obvious at first, but you don't actually need to configure a
61+
It was non-obvious to me at first, but you don't actually need to configure a
6762
trigger to move on. A trigger is how the Lambda function typically knows
68-
when to execute based on an event from another AWS service such as API
69-
Gateway or Cloudwatch.
63+
when to execute based on an event from another AWS service such as
64+
[API Gateway](https://aws.amazon.com/api-gateway/) or
65+
[Cloudwatch](https://aws.amazon.com/cloudwatch/).
7066

7167
<img src="/img/170429-aws-lambda-python-3-6/configure-triggers.jpg" width="100%" class="technical-diagram img-rounded bordered" alt="Configure Lambda trigger screen.">
7268

7369
We won't configure a trigger for this function because we can manually
74-
kick off the Lambda later to test it. Leave the trigger icon blank and
75-
click the "Next" button to move along.
70+
kick off the Lambda to test it when we are finished configuring it. Leave
71+
the trigger icon blank and click the "Next" button to move along.
7672

7773
<img src="/img/170429-aws-lambda-python-3-6/blank-lambda.jpg" width="100%" class="technical-diagram img-rounded bordered" alt="The Lambda configuration screen.">
7874

@@ -137,7 +133,8 @@ Enter the keys named `what_to_print` and `how_many_times` then enter their
137133
values. Use a string message for `what_to_print`'s value and an integer
138134
whole number above 0 for `how_many_times`. Our Python code's error handling
139135
is not very robust so a value other than a number in the `how_many_times`
140-
variable will cause the script to throw an error when it is executed.
136+
variable will cause the script to throw an error when it is executed due
137+
to the forced casting of `how_many_times` via the `int()` function.
141138

142139
<img src="/img/170429-aws-lambda-python-3-6/environment-variables.jpg" width="100%" class="technical-diagram img-rounded bordered" alt="Section to set environment variables for the Lambda function.">
143140

@@ -202,7 +199,7 @@ function! The real power of Lambda comes in when you use triggers to
202199
your Lambda function so it executes based on events that happen.
203200
We will take a look at that in the next tutorial.
204201

205-
Take a look at the [AWS Lambda](/aws-lambda.html) page for additional
202+
View the [AWS Lambda Full Stack Python page](/aws-lambda.html) for additional
206203
examples and tutorials that other folks have shared for Lambda with Python.
207204

208205
Questions? Contact me via Twitter
@@ -211,5 +208,5 @@ or [@mattmakai](https://twitter.com/mattmakai). I am also on GitHub with
211208
the username [mattmakai](https://github.com/mattmakai).
212209

213210
Something wrong with this post? Fork
214-
[this page's source on GitHub](https://github.com/mattmakai/fullstackpython.com/blob/master/content/posts/170429-python-3-6-aws-lambda.markdown).
215-
211+
[this page's source on GitHub](https://github.com/mattmakai/fullstackpython.com/blob/master/content/posts/170429-python-3-6-aws-lambda.markdown)
212+
and submit a pull request.

0 commit comments

Comments
 (0)