Skip to content

Commit

Permalink
Merge pull request awsdocs#84 from yuyokk/patch-1
Browse files Browse the repository at this point in the history
Update tutorial-env_cli.md
  • Loading branch information
mwunderl authored Apr 2, 2019
2 parents 27f8803 + 2a75d80 commit 7f3b443
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions doc_source/tutorial-env_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ The code sample below reads the environment variable of a Lambda function that r

1. Open a text editor and copy the following code:

```
var AWS = require('aws-sdk');
exports.handler = function(event, context, callback) {
var bucketName = process.env.S3_BUCKET;
callback(null, bucketName);
}
```
```js
exports.handler = function(event, context, callback) {
var bucketName = process.env.S3_BUCKET;
callback(null, bucketName);
};
```

1. Save the file as *index\.js*\.

Expand Down Expand Up @@ -69,4 +66,4 @@ $ aws lambda update-function-configuration --function-name ReturnBucketName \
--environment Variables={S3_BUCKET=Prod}
```

Run the `aws lambda invoke` command again using the same parameters\. This time, the Lambda function will return the Amazon S3 bucket name as `Prod`\.
Run the `aws lambda invoke` command again using the same parameters\. This time, the Lambda function will return the Amazon S3 bucket name as `Prod`\.

0 comments on commit 7f3b443

Please sign in to comment.