I want to get an ami id from AWS SDK for Ruby
AWS SDK for Ruby V2
Please use this as a reference.
require 'aws-sdk'
ec2=Aws::EC2::Resource.new(region: 'ap-northeast-1')
ec2.images.each do|i|
puts "ID:#{i.image}"
end
I've set up a program called , but when I run it, it doesn't show anything and I'm in trouble.
I would appreciate it if you could help me.
Thank you for your cooperation.
ami has already been created.
SDK works.
ruby 2.3.3
AWS SDK for Ruby V2
ubuntu 18.04
How about checking the contents of i
first?
ec2.images.each do|i|
pi
end
Is the image of that target created in the Tokyo region?Is it in a different region?
764 M2 Mac fails to install rbenv install 3.1.3 due to errors
845 Uncaught (inpromise) Error on Electron: An object could not be cloned
1225 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
768 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.