Skip to content

Commit a6685be

Browse files
committed
Link to lambda execution environment lifecycle documentation
1 parent 07dacf0 commit a6685be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class Greet extends Handler {
3434

3535
The two parameters passed are *$event* (a value [depending on where the lambda was invoked from](https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html)) and *$context* (a Context instance, see [below](https://github.com/xp-forge/lambda#context)).
3636

37-
If you need to run any initialization code, you can do before returning the lambda from *target()*. This code is only run once during the initialization phase. It has access to the lambda's environment via *$this->environment* (an Environment instance, see [below](https://github.com/xp-forge/lambda#environment)):
37+
### Initialization
38+
39+
If you need to run any initialization code, you can do so before returning the lambda from *target()*. This code is only run once during the [init phase](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html#runtimes-lifecycle):
3840

3941
```php
4042
use com\amazon\aws\lambda\Handler;
@@ -56,6 +58,8 @@ class Greet extends Handler {
5658
}
5759
```
5860

61+
The lambda's environment accessible via *$this->environment* is an Environment instance, see [below](https://github.com/xp-forge/lambda#environment).
62+
5963
Development
6064
-----------
6165
To run your lambda locally, use the following:

0 commit comments

Comments
 (0)