Publish project

In order to deploy the function, right click on the Lambda project and click on the Publish to AWS Lambda... menu option.

Publish project

Type in the function name as KMSDemoFunction. Leave everything else as the default and click on the Next button.

Publish project

On the Advanced Function Details screen, select the same role which you created in the first exercise (that role has access to the AWS Systems Manager Parameter Store and the encryption key).

Publish project

The upload will start the function deployment. The deployment screen will close and test screen will open as soon as the AWS Lambda function is uploaded successfully.

Type in any string as input (as input has no meaning here) and then click on the Invoke button. It will execute the function and return the parameter value as the result.

Test project