@@ -33,41 +33,43 @@ Create an AWS Lambda function using the Client API (low-level) of Boto 3.
33
33
34
34
Setting your credentials for use by the AWS SDK for Java can be done in a number of ways, but here are the recommended approaches:
35
35
36
- * The default credential profiles file
36
+ * The default credential profiles file.
37
37
38
38
Set credentials in the AWS credentials profile file on your local system, located at:
39
39
40
- ` ~/.aws/credentials ` on Linux, macOS, or Unix
40
+ * ` ~/.aws/credentials ` on Linux, macOS, or Unix.
41
41
42
- ` C:\Users\USERNAME\.aws\credentials ` on Windows
42
+ * ` C:\Users\USERNAME\.aws\credentials ` on Windows.
43
43
44
44
This file should contain lines in the following format:
45
45
46
46
``` bash
47
47
[default]
48
- aws_access_key_id = < your_access_key_id >
49
- aws_secret_access_key = < your_secret_access_key >
48
+ aws_access_key_id = < YOUR_ACCESS_KEY_ID >
49
+ aws_secret_access_key = < YOUR_SECRET_ACCESS_KEY >
50
50
```
51
- Substitute your own AWS credentials values for the values ` < your_access_key_id > ` and ` < your_secret_access_key > ` .
51
+ Replace the values of ` < YOUR_ACCESS_KEY_ID > ` and ` < YOUR_SECRET_ACCESS_KEY > ` by your AWS credentials .
52
52
53
- * Environment variables ` AWS_ACCESS_KEY_ID` and ` AWS_SECRET_ACCESS_KEY`
53
+ * Environment variables ` AWS_ACCESS_KEY_ID` and ` AWS_SECRET_ACCESS_KEY` .
54
54
55
55
Set the ` AWS_ACCESS_KEY_ID` and ` AWS_SECRET_ACCESS_KEY` environment variables.
56
56
57
57
To set these variables on Linux, macOS, or Unix, use ` export` :
58
58
59
59
` ` ` bash
60
- export AWS_ACCESS_KEY_ID=< your_access_key_id >
61
- export AWS_SECRET_ACCESS_KEY=< your_secret_access_key >
60
+ export AWS_ACCESS_KEY_ID=< YOUR_ACCESS_KEY_ID >
61
+ export AWS_SECRET_ACCESS_KEY=< YOUR_SECRET_ACCESS_KEY >
62
62
` ` `
63
63
64
64
To set these variables on Windows, use ` set` :
65
65
66
66
` ` ` bash
67
- set AWS_ACCESS_KEY_ID=< your_access_key_id >
68
- set AWS_SECRET_ACCESS_KEY=< your_secret_access_key >
67
+ set AWS_ACCESS_KEY_ID=< YOUR_ACCESS_KEY_ID >
68
+ set AWS_SECRET_ACCESS_KEY=< YOUR_SECRET_ACCESS_KEY >
69
69
` ` `
70
70
71
+ Replace the values of ` < YOUR_ACCESS_KEY_ID> ` and ` < YOUR_SECRET_ACCESS_KEY> ` by your AWS credentials.
72
+
71
73
* You need a ` .py` file where the code of the Lambda function is located.
72
74
73
75
You can use the code obtained from the AWS Lambda Function Hello World JSON Java example: [awslambdahellojson](/awslambdahellojson).
@@ -80,17 +82,17 @@ Create an AWS Lambda function using the Client API (low-level) of Boto 3.
80
82
81
83
* Run the code.
82
84
83
- You must provide 4 parameters:
85
+ You must provide 4 parameters, replace the values of :
84
86
85
- * ` < FUNCTION_NAME> ` = Lambda function name
86
- * ` < FUNCTION_FILE> ` = The path to the ` .py` file where the code of the Lambda function is located
87
- * ` < FUNCTION_ROLE> ` = The role ARN that has Lambda permissions
88
- * ` < FUNCTION_HANDLER> ` = The fully qualifed method name (Ex: lambda_function.lambda_handler)
87
+ * ` < FUNCTION_NAME> ` by Lambda function name.
88
+ * ` < FUNCTION_FILE> ` by path to the ` .py` file where the code of the Lambda function is located.
89
+ * ` < FUNCTION_ROLE> ` by role ARN that has Lambda permissions.
90
+ * ` < FUNCTION_HANDLER> ` by fully qualifed method name (Ex: lambda_function.lambda_handler).
89
91
90
92
Run application:
91
93
92
94
` ` ` bash
93
- python lambdacreate.py lambda-name lambda-file lambda-role lambda-handler
95
+ python lambdacreate.py < FUNCTION_NAME > < FUNCTION_FILE > < FUNCTION_ROLE > < FUNCTION_HANDLER >
94
96
` ` `
95
97
96
98
You must use as a function role the ARN.
0 commit comments