Renews STS assumed role session for S3
npm install s3-session-manager
Basic usage:
import {S3SessionManager} from 's3-session-manager';
const sessionManager = new S3SessionManager({
roleRequest: {
RoleArn: 'someRole',
RoleSessionName: 'SessionName'
}
});
const s3Client = sessionManager.getClient();
Example with CloudHound:
import {S3Hound} from 'cloudhound';
import {S3SessionManager} from 's3-session-manager';
const sessionManager = new S3SessionManager({
roleRequest: {
RoleArn: 'someRole',
RoleSessionName: 'SessionName'
}
});
const cloudHound = S3Hound.newQuery({
bucket: 'myBucket',
s3Factory: sessionManager
});
const results = await cloudHound.find();
npm test
To generate a test coverage report:
npm run coverage