alexcasalboni / aws-lambda-power-tuning

AWS Lambda Power Tuning is an open-source tool that can help you visualize and fine-tune the memory/power configuration of Lambda functions. It runs in your own AWS account - powered by AWS Step Functions - and it supports three optimization strategies: cost, speed, and balanced.
Apache License 2.0
5.49k stars 379 forks source link

Change visualizationURL after installation #255

Closed paul-uz closed 3 months ago

paul-uz commented 3 months ago

How can I change the visualizationURL after I have installed the Power Tuner on my account with the default value? I;'ve like to change it to something else but cannot find the option anywhere

alexcasalboni commented 3 months ago

Hi 👋 thanks for reaching out!

The visualization URL can only be configured at deploy time, as it becomes an environment variable for the Lambda function and it needs to be available at creation time.

I’d suggest to deploy a new stack of Lambda Power Tuning with the new URL.

Alternatively, you could also just replace the default host name with your custom URL before visiting it. All the relevant parameters/numbers/statistics are passed via hash.

I hope this helps. And I’d be glad to hear more about what you’re doing with your custom visualization. That repository hasn’t been updated in a while and I wouldn’t hate building a new version with more viz features.

On Thu, 1 Aug 2024 at 13:34, Paul Canning @.***> wrote:

How can I change the visualizationURL after I have installed the Power Tuner on my account with the default value? I;'ve like to change it to something else but cannot find the option anywhere

— Reply to this email directly, view it on GitHub https://github.com/alexcasalboni/aws-lambda-power-tuning/issues/255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASX75CGTOATOT2KUDA7AMTZPIMLFAVCNFSM6AAAAABL2LZXL2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2DEMRRHE4DCNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

paul-uz commented 3 months ago

Can't I just change the env variable in the Lambda?

alexcasalboni commented 3 months ago

That would work too, if you prefer a quick workaround :)

On Thu, 1 Aug 2024 at 20:32, Paul Canning @.***> wrote:

Can't I just change the env variable in the Lambda?

— Reply to this email directly, view it on GitHub https://github.com/alexcasalboni/aws-lambda-power-tuning/issues/255#issuecomment-2263711654, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASX75A7YV3D5K6UQQKMELTZPJ5M3AVCNFSM6AAAAABL2LZXL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTG4YTCNRVGQ . You are receiving this because you commented.Message ID: @.***>

paul-uz commented 3 months ago

I guess the main issue is there is no quick way to get to view the Viz data. You have to view the output JSON and highlight the link and copy n paste it. Would be great if there was a way to pipe this through to a system automatically

alexcasalboni commented 3 months ago

Thanks for sharing, @paul-uz! I understand what you mean.

That's one of the downsides of using Step Functions, in the sense that it doesn't come with a built-in visualization mechanism.

Some folks are automating this by running the entire power-tuning process in an automated way, then grabbing the JSON output and doing all sort of things (storing results in a database, visualizing in table format for internal reports, taking a screenshot of the visualization page, etc).

The starting point could be as sample as this sample bash script: https://github.com/alexcasalboni/aws-lambda-power-tuning/blob/master/scripts/execute.sh

alexcasalboni commented 3 months ago

Closing for now.