diff --git a/x-pack/plugins/fleet/public/hooks/use_create_cloud_formation_url.ts b/x-pack/plugins/fleet/public/hooks/use_create_cloud_formation_url.ts index 861217a272a3..a28b0f46adb4 100644 --- a/x-pack/plugins/fleet/public/hooks/use_create_cloud_formation_url.ts +++ b/x-pack/plugins/fleet/public/hooks/use_create_cloud_formation_url.ts @@ -17,7 +17,7 @@ type AwsAccountType = 'single_account' | 'organization_account'; const CLOUDBEAT_AWS = 'cloudbeat/cis_aws'; const getAwsAccountType = (input?: PackagePolicyInput): AwsAccountType | undefined => - input?.streams[0].vars?.['aws.account_type'].value; + input?.streams[0].vars?.['aws.account_type']?.value; export const useCreateCloudFormationUrl = ({ enrollmentAPIKey,