Method: Jets::Commands::Call#add_console_link_to_clipboard
- Defined in:
- lib/jets/commands/call.rb
#add_console_link_to_clipboard ⇒ Object
So use can quickly paste this into their browser if they want to see the function via the Lambda console
137 138 139 140 141 142 143 144 145 146 |
# File 'lib/jets/commands/call.rb', line 137 def add_console_link_to_clipboard return unless RUBY_PLATFORM =~ /darwin/ return unless system("type pbcopy > /dev/null") # TODO: for add_console_link_to_clipboard get the region from the ~/.aws/config and AWS_PROFILE setting region = Aws.config[:region] || 'us-east-1' link = "https://console.aws.amazon.com/lambda/homepage?region=#{region}#/functions/#{function_name}?tab=configuration" system("echo #{link} | pbcopy") puts "Pro tip: The Lambda Console Link to the #{function_name} function has been added to your clipboard." unless [:mute] end |