class Aws::Plugins::EC2CopyEncryptedSnapshot::Handler
@api private
def call(context)
def call(context) params = context.params params[:destination_region] = context.config.region params[:presigned_url] = presigned_url(context.client, params) @handler.call(context) end
def presigned_url(client, params)
def presigned_url(client, params) client = source_region_client(client, params) client.handle(PresignHandler, step: :build, priority: 0) client.handlers.remove(Handler) client.copy_snapshot(params).data # presigned url end
def source_region_client(client, params)
def source_region_client(client, params) EC2::Client.new({ region: params[:source_region] || 'region', credentials: client.config.credentials, }) end