Sha256: 2dc7187a3dc2bd2f7549f880dc039b2580fdd8dd9435f2fe106a28d3095d0bc0

Contents?: true

Size: 767 Bytes

Versions: 29

Compression:

Stored size: 767 Bytes

Contents

require "aws-sdk-cloudformation"
require "aws-sdk-ec2"
require "aws-sdk-iam"
require "aws-sdk-s3"

require "aws_mfa_secure/ext/aws" # add MFA support

module Lono
  module AwsServices
    extend Memoist
    include Helper

    def cfn
      Aws::CloudFormation::Client.new
    end
    memoize :cfn

    def ec2
      Aws::EC2::Client.new
    end
    memoize :ec2

    def iam
      Aws::IAM::Client.new
    end
    memoize :iam

    def s3
      Aws::S3::Client.new
    end
    memoize :s3

    def s3_resource
      Aws::S3::Resource.new
    end
    memoize :s3_resource

    def s3_presigner
      Aws::S3::Presigner.new(client: s3)
    end
    memoize :s3_presigner

    def sts
      Aws::STS::Client.new # part of aws-sdk-core
    end
    memoize :sts
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lono-7.5.2 lib/lono/aws_services.rb
lono-7.5.1 lib/lono/aws_services.rb
lono-7.5.0 lib/lono/aws_services.rb
lono-7.4.11 lib/lono/aws_services.rb
lono-7.4.10 lib/lono/aws_services.rb
lono-7.4.9 lib/lono/aws_services.rb
lono-7.4.8 lib/lono/aws_services.rb
lono-7.4.7 lib/lono/aws_services.rb
lono-7.4.6 lib/lono/aws_services.rb
lono-7.4.5 lib/lono/aws_services.rb
lono-7.4.4 lib/lono/aws_services.rb
lono-7.4.3 lib/lono/aws_services.rb
lono-7.4.2 lib/lono/aws_services.rb
lono-7.4.1 lib/lono/aws_services.rb
lono-7.4.0 lib/lono/aws_services.rb
lono-7.3.2 lib/lono/aws_services.rb
lono-7.3.1 lib/lono/aws_services.rb
lono-7.3.0 lib/lono/aws_services.rb
lono-7.2.3 lib/lono/aws_services.rb
lono-7.2.2 lib/lono/aws_services.rb