Skip to content

Installation

Marco Bonvini edited this page Mar 27, 2017 · 1 revision

Prerequisites

AWS account

λ-Sim requires access to AWS services through its API. To access AWS services via its API you need an access key. Look here to see how to get one.

After following the guide, you should have a hidden folder named .aws in your home directory. Such a folder contains a file called credentials. The contents of ~/.aws/credentials should look like the following

[default]
aws_access_key_id = <access_key_id>
aws_secret_access_key = <access_key_secret>
region = <your_aws_region>

[<your_access_key_name>]
aws_access_key_id = <access_key_id>
aws_secret_access_key = <access_key_secret>
region = <your_aws_region>

The AWS command line tool and AWS libraries like boto3 will automatically use the information stored in this configuration file.

In order to use λ-Sim, the AWS account requires the following permissions

  • s3:FullAccess,
  • lambda:FullAccess,
  • iam:CreateRole,
  • apigateway:FullAccess

jq

λ-Sim uses jq to manipulate and parse JSON documents. If you don't have jq installed in your system please have a kook here for more info.

Python and virtualenv

λ-Sim uses different Python packages and tools to interact with AWS service. The λ-Sim dependencies are automatically installed in a virtual environment. If you don't have Python and virtualenv you have to install them before using λ-Sim.

Installation

The repository contains a Makefile, run

make install

to install all the dependencies required to

  • deploy the model to S3,
  • create and configure the lambda function,
  • create and configure the API gateway that exposes the REST API

This command also creates an S3 bucket where all the FMU you deploy will be stored.

Clone this wiki locally