Sha256: 91c790e053b742ade01b8165b1c772223b2bf5e47a9a48faa6eceff047b8adfd
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require_relative 'auth' require_relative 'helper' require_relative 'zenv' module Smash module CloudPowers module AwsResources include Smash::CloudPowers::Auth include Smash::CloudPowers::Helper include Smash::CloudPowers::Zenv def region zfind(:aws_region) || 'us-west-2' end def ec2 @ec2 ||= Aws::EC2::Client.new( region: region, credentials: Auth.creds ) end def image(name) ec2.describe_images( filters: [{ name: 'tag:aminame', values: [name.to_s] }] ).images.first end def kinesis @kinesis ||= Aws::Kinesis::Client.new( region: region, credentials: Auth.creds, ) end def s3 @s3 ||= Aws::S3::Client.new( region: region, credentials: Auth.creds ) end def sns @sns ||= Aws::SNS::Client.new( region: region, credentials: Auth.creds ) end def sqs @sqs ||= Aws::SQS::Client.new( credentials: Auth.creds ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cloud_powers-0.2.4 | lib/cloud_powers/aws_resources.rb |
cloud_powers-0.2.3 | lib/cloud_powers/aws_resources.rb |