Modify based on code review comments.

Signed-off-by: Jussi Hallila <jussi@hallila.com>
This commit is contained in:
Jussi Hallila
2022-03-17 08:44:20 +01:00
parent 1fc19dd3ec
commit b70bdac610
2 changed files with 2 additions and 5 deletions
@@ -172,15 +172,12 @@ export class AwsS3UrlReader implements UrlReader {
const roleArn = integration.config.roleArn;
if (roleArn) {
const externalIdParam = integration.config.externalId
? { ExternalId: integration.config.externalId }
: {};
return new aws.ChainableTemporaryCredentials({
masterCredentials: explicitCredentials,
params: {
RoleSessionName: 'backstage-aws-s3-url-reader',
RoleArn: roleArn,
...externalIdParam,
ExternalId: integration.config.externalId,
},
});
}
+1 -1
View File
@@ -61,7 +61,7 @@ export type AwsS3IntegrationConfig = {
roleArn?: string;
/**
* (optional) External ID to use when assuming role
* (Optional) External ID to use when assuming role
*/
externalId?: string;
};