Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/aws

src/scheduled-identity-check.ts

17 lines · 478 B · TypeScript
import { getCallerIdentity } from './identity.ts'
import { resolveRegion } from './config.ts'

/**
 * No-argument scheduled wrapper for an optional daily STS identity check.
 * The package job stays disabled until you fork and enable it.
 */
export default async function scheduledIdentityCheck() {
	const region = await resolveRegion()
	const identity = await getCallerIdentity({ region })
	return {
		ok: true,
		region,
		account: identity.account,
		arn: identity.arn,
	}
}