Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws_local_config_parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws_local_config_parser

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

AwsLocalConfigParser

Parse your local "$HOME"/.aws/config to use it within a Ruby script.

Up and Running

  1. Checkout this repo: gh repo clone fac/aws_local_config_parser
  2. Run: bin/setup
  3. Run: bin/demo

Usage

See demo for examples on how to use the gem.

Supports parsing and returning:

  • Profiles with SSO
  • Profiles with Access Key + Secret
  • SSO Sessions
require 'aws_local_config_parser'

config = AwsLocalConfigParser.new

# Profile with SSO
my_sso_profile = config.profile('my-sso-profile-name')
my_sso_profile.sso_session
my_sso_profile.sso_account_id
my_sso_profile.sso_role_name
my_sso_profile.region

## Profile with Access Key + Secret
non_sso_profile = config.profile('my-non-sso-profile-name')
non_sso_profile.aws_access_key_id
non_sso_profile.aws_secret_access_key
non_sso_profile.region

## SSO Session
my_sso_session = config.sso_session('sso-session')
my_sso_session.sso_start_url
my_sso_session.sso_registration_scopes
my_sso_session.sso_region

## Listing all names
config.all_profiles
config.all_sso_sessions

Making a commit

Lefthook has been configured with pre-commit checks to:

  • run rubocop for any ruby files

If for some reason it's necessary, it's possible to temporarily skip lefthook with: LEFTHOOK=0 git commit.

Create a new release

Following Sematic Versioning, bump the version:

  1. gem bump --version "<sem_ver_bump>" and merge the changes to main
  2. The Release and Build Gem wokflow will trigger a new version build
  3. Manually create a new release:
    1. Click on Draft a new release
    2. In the Choose a tag dropdown, selecting the new version
    3. Click Generate release notes and review the notes
    4. Ensure Set as the latest release is checked
    5. Click Publish release

FAQs

Package last updated on 10 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc