An example of a basic application using serverless components. The application creates a AWS Lambda function and maps it to the handler code provided to it. It also creates an appropriate role and assigns it to the Lambda function. The application is deployable to AWS.
The sample application is composed of the following components:
- Lambda function: It creates one Lambda function with the handler code provided to it. The
aws-lambdacomponent encapsulates all that functionality. - Role: It creates a new role with a
AssumeRolepolicy for the Lambda service. An existingpolicycan also be provided, in which case therolejust uses thatpolicy. Theaws-iam-rolecomponent encapsulates all that functionality.
To deploy the application and create all dependent resources automatically, simply do:
$ components deploy
To remove the application and delete all dependent resources automatically, simply do:
$ components remove
