
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
AWSConfig is a parser for AWS_CONFIG_FILE used in aws-cli.
Add this line to your application's Gemfile:
gem 'aws_config'
And then execute:
$ bundle
Or install it yourself as:
$ gem install aws_config
It parses ~/.aws/config
and ~/.aws/credentials
by default.
If your aws config files look like this:
Credentials file
[default]
aws_access_key_id=DefaultAccessKey01
aws_secret_access_key=Default/Secret/Access/Key/02
[testing]
aws_access_key_id=TestingAccessKey03
aws_secret_access_key=Testing/Secret/Access/Key/04
Config file
[default]
# Optional, to define default region for this profile.
region=us-west-1
source_profile=default
[profile testing]
role_arn=arn:example:283671836
region=us-west-2
source_profile=testing
[profile with_mfa]
source_profile=testing
region=ap-southeast-2
mfa_serial=arn:mfa_device:151235152134
you can access it like:
require "aws_config"
puts AWSConfig.default.aws_access_key_id #=> DefaultAccessKey01
puts AWSConfig.default.region #=> Default/Secret/Access/Key/02
also you can do like hashes:
puts AWSConfig["default"]["aws_access_key_id"] #=> DefaultAccessKey01
puts AWSConfig["default"]["region"] #=> Default/Secret/Access/Key/02
If your config contains chained profiles using the source_profile
property,
you can still access the source profiles properties from the top i.e
require "aws_config"
puts AWSConfig.with_mfa.role_arn #=> arn:example:283671836
puts AWSConfig.with_mfa.region #=> ap-southeast-2
If you want to use with aws-sdk-ruby, you can configure like:
AWS.config(AWSConfig.default.config_hash)
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that aws_config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.