Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/providers/bedrock/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ export async function getAssumedRoleCredentials(
sha256: Sha256,
});
const date = new Date();
const sessionName = `${date.getFullYear()}${date.getMonth()}${date.getDay()}`;
// YYYYMMDD; RoleSessionName is visible in CloudTrail and the CUR's line-item identity
const sessionName = date.toISOString().slice(0, 10).replace(/-/g, '');
const url = `https://${hostname}?Action=AssumeRole&Version=2011-06-15&RoleArn=${awsRoleArn}&RoleSessionName=${sessionName}${awsExternalId ? `&ExternalId=${awsExternalId}` : ''}`;
const urlObj = new URL(url);
const requestHeaders = { host: hostname };
Expand Down