Can You Deploy Smart Contracts Using Lambdas? Or should another AWS product be used?

0

Good day.

Most blockchains are offering CLIs which can be installed using Rust/Cargo.

In our current DevOps flow, we are having to build and deploy our smart contracts manually via the command.

I've tried to setup a Lambda, with a Blockchain CLI installed so I can build and deploy our contracts, automatically, and at a small scale.

However, I'm having a hard time getting it to work. Is it actually possible todo this using Lambda?

Or would another AWS product be better suited for this type of work.

Thank you greatly.

EDIT:

So for more context, I"m trying todo some stuff with the Solana CLI. It's installed via a rust package see (https://docs.solana.com/cli/install-solana-cli-tools)

I've went ahead and setup a Lambda based on a container image with Solana CLI installed.

But when it's time to run /root/cargo/bin/solana I get Permission Denied.

I can get around this by moving /root/cargo/bin/solana to the /tmp folder, but this prevents the Lambda from being used by more than one person at once (because /tmp is wiped at the start of each function invocation.

There must be another way todo this, but I can't see it.

Maybe I can ensure only one person runs Lambda at once, but not sure how.

Lambda layers looked promising but they have a limit of 250MB and I'm not sure I can fit everything in there, but I'm going to try.

What am I missing? It feels basic to be able to call a CLI from inside a Lambda, but maybe I should be using a different AWS service.

  • Which issues are you encountering?

  • Which blockchain are you using?

  • Thanks for the comments. I'm doing stuff on Solana blockchain, ran into permission problems. I've added an edit in my post to mention in more detail.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions