Skip to content

Setup

Requirements

  1. Install Python 3.9 or greater.
  2. Install the AWS SAM CLI. This page has instructions for Linux, macOS, and Windows distributions.
  3. Install Docker to use with AWS SAM CLI.
    • Docker should be left running (the default) while you build your BACE application.
  4. Complete the AWS Serverless Application Model (SAM) Prerequisites.

    • The goal here is to create an AWS account (if you have not had one), and a user with permissions to your account, either through IAM Identity Center (the recommended approach by AWS) or IAM (old approach). In either approach, the created user needs to be assigned the appropriate permissions.
    • The user's credentials should be available for AWS SAM CLI to access: In the recommended approach (through IAM Identity Center), the user does not need an Access Key and Secret Key and will use SSO (Single Sign-On) to authenticate; the SSO process will create temporary Access Key and Secret Key behind the scene with each login session.
    • Note: The AWS instructions to complete the prerequisites may be confusing because of the different possible approaches that are not interconnected and may be subject to changes. For example, the recommended IAM Identity Center is newer so mentions of the old approach are scattered throughout, but if you use the old approach, you will get reminded by AWS to use the new one.
    • To follow the recommended approach, the main two steps are:
    • If you can get the tutorial for deploying a Hello World application to work, you have completed these prerequisites.
    • Note for new AWS users:
      • We recommend that you choose a Region and stay consistent when working with projects. Projects in different regions are independent of each other, even if they share the same name.
      • We also recommend you to check your concurrency and memory quotas as AWS may limit these quotas for new users. You can check your quotas by opening up the Service Quotas console at https://console.aws.amazon.com/servicequotas/home. The default concurrency limit for the number of Lambda containers that are run concurrently is 1000, which is usually sufficient. However, in some regions, the concurrency limit is throttled to a lower value for new AWS accounts, as low as 10. In that case, you should request a quota increase.

Install Python Requirements for Local Testing

To run simulations and test the application locally, you must install the required Python packages on your local computer. We recommend creating a virtual environment prior to installing requirements.txt. A virtual environment is not required but is useful for managing different versions of Python packages. Follow the instructions for installing and using pip and virtual environments to do so.

Install requirements locally. This step may take a few minutes. From the BACE repo folder:

python -m pip install -r requirements.txt