Skip to content

Instantly share code, notes, and snippets.

@kevbo
Created August 25, 2025 17:53
Show Gist options
  • Save kevbo/5df093982377c4ac1d5421dd6f84b4bf to your computer and use it in GitHub Desktop.
Save kevbo/5df093982377c4ac1d5421dd6f84b4bf to your computer and use it in GitHub Desktop.
Check SF for references to AWS
-- Named Credentials targeting AWS
SELECT DeveloperName, Endpoint, CalloutOptions
FROM NamedCredential
WHERE Endpoint LIKE '%amazonaws.com%' OR Endpoint LIKE '%.s3.%' OR Endpoint LIKE '%.execute-api.%';
-- External Credentials referencing AWS (API name may vary by org)
SELECT DeveloperName, MasterLabel, SchemaType
FROM ExternalCredential
WHERE MasterLabel LIKE '%AWS%' OR MasterLabel LIKE '%Amazon%';
-- Auth Providers that look like AWS/Cognito
SELECT Id, DeveloperName, ProviderType, ConsumerKey, AuthorizeUrl, TokenUrl
FROM AuthProvider
WHERE DeveloperName LIKE '%AWS%' OR AuthorizeUrl LIKE '%amazonaws.com%' OR TokenUrl LIKE '%amazonaws.com%';
-- Remote Site Settings to AWS
SELECT DeveloperName, Url
FROM RemoteSiteSetting
WHERE Url LIKE '%amazonaws.com%';
-- External Data Sources (OData/other) to AWS
SELECT DeveloperName, Endpoint, Type
FROM ExternalDataSource
WHERE Endpoint LIKE '%amazonaws.com%';
-- Workflow Outbound Messages to AWS
SELECT Id, Name, EndpointUrl
FROM WorkflowOutboundMessage
WHERE EndpointUrl LIKE '%amazonaws.com%';
-- (Tooling API) Apex classes making HTTP callouts to AWS
SELECT Name, ApiVersion
FROM ApexClass
WHERE Status = 'Active' AND Body LIKE '%http%' AND Body LIKE '%amazonaws.com%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment