Comments (6)
Hmm... could you send a PR?
I'm not sure where is the code did you edit.
from fluent-plugin-s3.
Hi, for testing I added line 231 you see below. I hard-coded the value just for testing purposes. How do I send a PR?
227 when @assume_role_credentials
228 c = @assume_role_credentials
229 credentials_options[:role_arn] = c.role_arn
230 credentials_options[:role_session_name] = c.role_session_name
231 **credentials_options[:region] = 'us-east-1'**
232 credentials_options[:policy] = c.policy if c.policy
233 credentials_options[:duration_seconds] = c.duration_seconds if c.duration_seconds
234 credentials_options[:external_id] = c.external_id if c.external_id
235 options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
from fluent-plugin-s3.
That was without the asterisks, sorry I was trying to make it bold. For clarity, the code is, with line 231 being the addition with a hard-coded value for testing/debugging.
227 when @assume_role_credentials
228 c = @assume_role_credentials
229 credentials_options[:role_arn] = c.role_arn
230 credentials_options[:role_session_name] = c.role_session_name
231 credentials_options[:region] = 'us-east-1'
232 credentials_options[:policy] = c.policy if c.policy
233 credentials_options[:duration_seconds] = c.duration_seconds if c.duration_seconds
234 credentials_options[:external_id] = c.external_id if c.external_id
235 options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
from fluent-plugin-s3.
We have s3_region
parameter so you cau use it.
See this code >
fluent-plugin-s3/lib/fluent/plugin/out_s3.rb
Line 107 in d6b7097
from fluent-plugin-s3.
So sorry, the code above obviously was wrong. So when I did set the env variable AWS_REGION='us-east-1' the problem goes away. I did have the s3_region setup in the config file, but looks like it totally ignored it when using assume role.
This crazy code change did indeed work when the environment variable was not setup.
options[:credentials] = Aws::AssumeRoleCredentials.new(client: Aws::STS::Client.new(region: 'us-east-1'), role_arn: c.role_arn, role_session_name: c.role_session_name)
Of course, would be better if the S3 plugin could use the s3_region parameter in assume role.
from fluent-plugin-s3.
Aws::AssumeRoleCredentials
uses Aws::STS::Client
without region by default.
We should set region to Aws::STS::Client
.
from fluent-plugin-s3.
Related Issues (20)
- Add support for AWS IAM Roles Anywhere HOT 3
- Add parameter to set HTTP "Accept-Encoding" header HOT 2
- Allow to ignore events that point to a file on s3 of size 0 HOT 3
- Only last event of the windows logs is sent to S3 with redundant entries in the file
- Add debug log after s3 put HOT 1
- gem dependency conflict HOT 2
- S3 output filling up /tmp HOT 2
- Invalid Credential Will Crash the Fluentd Worker HOT 1
- When match_regexp not matched, message is discarded HOT 1
- s3 input is not separating log entries HOT 2
- td-agent is throwing error error_class=Fluent::ConfigError error="'columnify' utility must be in PATH for -h compression" HOT 2
- td-agent is able to run columnify -h yet td-agent throwing err
- fluent-plugin-s3 doesn't seem to work with AWS short-term credentials
- Plugin not working on basic implementation HOT 1
- enable multiline parsing
- instance_profile_credentials are not allowing uploads to my S3 bucket
- Append file support HOT 3
- s3_object_key_format without index overwrites (not append) log files HOT 10
- Too many open files HOT 1
- SSE-C Encryption
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-plugin-s3.