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.

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠