# Upgrading Yoda to v1.2.1 on GuanYu testnet2
Please follow the instructions below to upgrade Yoda program. Note that we are deprecating support of Docker execution due to its unreliability and resource consumption. To ensure that we have a robust testnet, we ask all validators to use AWS lambda as the executor while we continue testing testnet2.
In the near future, we will introduce more cloud function executors like Google Cloud Function or Microsoft Serverless. We will also revisiting Docker execution once we verify that AWS lambda is mature enough.
**Please complete the steps below as soon as possible so we can continue testing the testnet.**
## Step 1 Setup lambda executor
### For those who already use Lambda Executor
We are upgrading to a new runtime. Please replace your lambda cloud function with the following zip file: https://github.com/bandprotocol/bandchain/releases/download/v1.2.1/lambda-yoda.zip
### For those who need to switch from Docker to Lambda
In your [AWS account](https://aws.amazon.com/lambda), go to AWS Lambda Page and click Create function.

### Follow the following steps:
- Fill your Function name. It will be your endpoint route.
- Select Runtime to Python 3.7
- For permission if you don’t have an existing role, just create a new one.

Click `Create function`. Once everything is complete, You will see this page.

Scroll down to `Function code` panel and click `Actions -> Upload a .zip file`. You will need to upload [the runtime zip](https://github.com/bandprotocol/bandchain/releases/download/v1.2.1/lambda-yoda.zip).


Scroll down to “Environment variables” section and add 2 environment variables: `MAX_EXECUTABLE` to 8192 (8 MB) and `MAX_DATA_SIZE` to 256.

Scroll down to Basic Settings and update the runtime configurations. We recommend using 512MB RAM and 12 seconds timeout.

We will use `API Gateway` for receiving a request from our `yoda` program. Let’s create a new trigger by clicking `+ Add trigger` -> `API Gateway` and follow the wizard to create a new API endpoint connecting to your Lambda function.



Once completed, you will see the endpoint API endpointthat will be used as the endpoint URL to test your Lambda function. You can test it with CURL.
```bash
curl --location --request POST '<your_api_endpoint>' \
--header 'Content-Type: application/json' \
--data-raw '{
"executable": "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKaW1wb3J0IHN5cwoKZGVmIG1haW4oZGF0YSk6CiAgICByZXR1cm4gZGF0YQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICB0cnk6CiAgICAgICAgcHJpbnQobWFpbigqc3lzLmFyZ3ZbMTpdKSkKICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICBwcmludChzdHIoZSksIGZpbGU9c3lzLnN0ZGVycikKICAgICAgICBzeXMuZXhpdCgxKQo=",
"calldata": "\"Hello lambda\"",
"timeout": 3000
}'
```
The expected result should be:
```json
{
"returncode": 0,
"stdout": "Hello lambda\n",
"stderr": "",
"version": "lambda:v1.0.3"
}
```
## Step 2 Install a version of yoda
### Build new version of yoda
```bash
cd bandchain/chain
git checkout master
git pull
git checkout v1.2.1
make install
```
### Confirm Yoda version
```bash
yoda version
# should show v1.2.1
```
### Config executor endpoint
```bash
yoda config executor "rest:<your_aws_lambda_endpoint>?timeout=10s"
```
### Restart yoda service
```bash
sudo systemctl restart yoda
```
## Step 3 Activate Oracle Functionality
Check on guanyu-testnet2.cosmoscan.io/validators if your validator has been deactivated. If so you must submit an activate transaction to your node. Note that you must wait 10 minutes after you get deactivated.
```
bandcli tx oracle activate --from <your_key>
```
It is very important that you keep your oracle status activate all the time. With the current parameter setting, validators (and their delegators) with inactive oracle status get 70% lower staking rewards.