Security overview
This document is for security reviewers. FunctionPilot can read, invoke and change Lambda functions across your AWS accounts, so its controls make sure that each person can do exactly what an administrator granted them, that AWS itself enforces it, and that every action can be traced to a person. Everything described here runs in your own AWS account.
Threat model
| Threat | Mitigation |
|---|---|
| A user reaches functions no one granted them | Two independent layers: grants checked by FunctionPilot on every request, and AWS credentials that a per-request session policy limits to the functions and actions the grants allow (Permissions) |
| A user reads another function's logs | FunctionPilot finds the log group from the function's own configuration; the browser never names one, and the session policy allows log actions on that one log group only |
| Someone impersonates another user | Federated sign-in; FunctionPilot trusts only email addresses the user can't choose, and binds the bootstrap admin to an immutable user ID (Identity and sign-in) |
| A stolen token is used from elsewhere | One-hour ID tokens, revocable 8-hour refresh tokens, and an optional IP allowlist checked on every request |
| A shared test leaks secrets | Saved tests are private by default. Making one public shows a warning that everyone who can invoke the function can read its payload and results; only the owner or an administrator can change or delete it |
| Environment variables leak secrets | Values are hidden unless the person may see them (people with edit, everyone who can view, or administrators only, as an administrator chooses); names are always shown. Variables that look like secrets are flagged, without showing the value, with guidance to move them to Secrets Manager or Parameter Store |
| Code reveals secrets or business logic | Reading code is a permission of its own (code, included in edit). The session policy denies lambda:GetFunction, which returns the code download link, on every function where the person lacks code |
| Actions can't be traced | An application audit log, plus the user's email as the SourceIdentity of every assumed-role session, so CloudTrail in every account names the person |
| A third party assumes a spoke role ("confused deputy") | Spoke roles trust only the hub's API role, and require your external ID and a source identity |
| FunctionPilot is used to change its own stack | Connection roles have no IAM, CloudFormation, DynamoDB or S3 permissions. Lambda changes are limited to configuration, versions, aliases, concurrency and code edits of text files; creating and deleting functions are not offered |
| Code is changed outside the deployment pipeline | Code edits need edit on the function, the Team plan and a connection at the Full access level; use ReadOnly or Operate where code must only come from your pipeline. The editor warns that edits bypass the pipeline, each deployment is audited with the changed file paths, and it shows on the function's deployment timeline and in CloudTrail with the person's email (Code) |
| The public live tail endpoint is abused | The function URL has no IAM authorisation, but the function validates the person's sign-in token itself and applies the same licence, plan, IP allowlist and permission checks as the API (Streaming live tail) |
| Data leaves your account | No vendor service is in the data path; the stack never contacts the vendor at runtime (What stays in your account) |
Out of scope: a malicious administrator of the AWS account (they can change any IAM policy), and the security of your identity provider and of users' devices.
Controls
| Principle | Control |
|---|---|
| Strong identity on every request | Every API route requires a Cognito ID token, validated by the API Gateway JWT authorizer (issuer and audience). The live tail function URL validates the same token itself. Administration routes check the role on each call |
| Least privilege | Each component has its own role with scoped permissions (IAM summary). Users act only through roles under the IAM path /functionpilot/, narrowed per request |
| Context-aware access | IP allowlist checked on every request (Business and above); outside it, every request except the sign-in check is refused |
| Short-lived credentials | Assumed-role sessions last 15 minutes. Code download links are short-lived presigned URLs |
| Strong authentication | Your identity provider's MFA applies. Cognito-only users must use TOTP MFA and passwords of at least 14 characters |
| Hardened portal | Strict Content Security Policy, HSTS and other headers (Portal hardening) |
| Auditability | Application audit log, API access logs, and CloudTrail in every account with the user's source identity (Audit) |
Identity and sign-in
FunctionPilot uses an Amazon Cognito user pool in your account, federated to IAM Identity Center, a SAML 2.0 IdP or an OIDC IdP, or with Cognito-managed users. The browser signs in with the authorisation code flow and PKCE.
Roles, grants, saved tests and the bootstrap admin are keyed on the email claim, so someone who could pick their own email could take over another person's access. FunctionPilot therefore accepts the email only when the user can't choose it, and refuses everyone else on every request:
| How the user signs in | Email trusted when |
|---|---|
| SAML: IAM Identity Center, Entra ID, Okta | Always: it is asserted by your directory and signed by the IdP |
| OIDC | The IdP says it is verified (email_verified, or xms_edov for Entra ID) |
| Cognito user pool user | It is marked verified; users can't change their own email |
The sign-in provider is read from the signed token. BootstrapAdminEmail is bound to the first
trusted sign-in's immutable user ID with a conditional write; from then on only that user is the
bootstrap admin, even if someone else later presents the same email.
Roles are Administrator and User, set per user email or per group. Groups come from the
Cognito user pool groups and from your IdP's groups attribute. See
Identity providers.
Permissions
What a user can do with a function is the intersection of:
- The connection's IAM role, set by the owner of each account:
ReadOnly,OperateorFull(LocalAccessLevelon the hub stack,AccessLevelon each spoke stack). - Grants: user or group, connection (or all), Regions (or all), function name patterns (
*and?), and the permissionsview,logs,code,invoke,editandmanage. Administrators hold every permission, still bounded by the role.
Grants are enforced twice. FunctionPilot checks them on every request, and for every AWS call it assumes the connection's role with:
SourceIdentity= the user's email, fixed for the session and visible in CloudTrail;- a role session name derived from the user's email;
- for non-administrators, a session policy that allows only the actions of their permissions, on the function ARNs their patterns match in that account and Region, and log actions on the one log group the request needs. If the policy would exceed the AWS size limit, the request is refused rather than widened.
So even if FunctionPilot's own check had a bug, AWS would refuse anything outside the grants.
A few read APIs have no resource-level permissions (lambda:ListFunctions,
cloudwatch:GetMetricData, tag:GetResources, cloudtrail:LookupEvents, and the Compute Optimizer
reads). For those, FunctionPilot filters the results by the caller's grants: a user never sees a
function they have no grant on, although the AWS layer alone would allow listing names and metrics in
that Region. The same filtering applies to everything served from the shared cache.
Live tail sessions are limited to the log groups of the functions requested. Power Tuning is limited
to state machines and executions whose name contains powerTuning in the connection's account, and
starting a run needs manage.
Code
- Reading code (download, the code viewer and comparing versions) needs the
codepermission, whicheditincludes. The session policy allowslambda:GetFunction, which returns the code download link, only on the functions where the person hascode, and denies it everywhere else. Downloads are audited. - The code viewer downloads the deployment package in the API Lambda and keeps an index of its
files, and the contents of files people open, in the shared cache, keyed by the package's SHA-256,
for 30 days. Only people with
codeon a function that has that exact package are served from it. Container images are never downloaded or unpacked. - Code edits (Team and above) need
editon the function and a connection at theFullaccess level, whose role allowslambda:UpdateFunctionCode. Only text files can be changed, at most 256 KiB per deployment, and the deployment is refused if the code changed since the editor opened. Publishing a version afterwards needsmanage. The editor and the confirmation both warn that the change bypasses your deployment pipeline. Each deployment is audited (function.code-update) with the paths of the changed files, never their contents, and CloudTrail records it with the person's email as the source identity; the function's deployment timeline shows it as a FunctionPilot change.
Streaming live tail
On the Team plan and above, live tail streams log lines through CloudWatch Logs Live Tail. Browsers
can't carry that stream through API Gateway, so a separate Lambda function serves it through a
Lambda function URL with response streaming (stack output LiveTailUrl).
- The function URL has auth type
NONEbecause browsers can't sign requests with IAM. The function itself validates the Cognito ID token on every request (signature against the user pool's keys, issuer, audience, token use and expiry), then applies the same checks as the API: trusted email, licence, plan, IP allowlist, and thelogspermission on every function requested (at most 10). A request that fails any check gets no data. - CORS allows only the portal's origin. Each stream ends after about 14 minutes and the browser reconnects, which repeats every check.
- AWS calls use the same per-user credentials and session policy as the API, limited to
logs:StartLiveTailon the requested functions' log groups. - Sharing between viewers. To limit Live Tail cost, people who follow the same set of functions with the same filter share one Live Tail session: one stream runs it and writes the events to the shared cache, and the others read them from there. Each viewer's permissions are checked before they can join. The events are kept in the cache for about two minutes; DynamoDB removes expired items in the background, usually within days, and expired items are never served. Sessions on personal connections are never shared between people.
Scheduled jobs
A worker Lambda runs every hour (EventBridge) to read data that AWS charges for per call: last invoked dates, cold starts, error groups, log retention and cost, and actual cost from Cost Explorer. Administrators turn each job on or off in Administration › Settings.
- The worker assumes the stack's connection roles, the local one and the spokes, never personal connections. It acts for no person, so it uses the connection role without a session policy, bounded by the role's access level, and only reads: function lists, CloudWatch metrics, Logs Insights queries over the functions' log groups, log group listings and Cost Explorer.
- Its sessions carry the source identity
jobs@functionpilot.worker(role session namefp-jobs@functionpilot.worker), so CloudTrail in each account tells them apart from people's actions. - Its results go to the shared cache, and every read is filtered by the caller's permissions as a
live call would be: error groups and other log-derived results only for people with
logson the function.
Personal AWS access
On the Team plan and above, administrators can let people act with their own AWS permissions instead of grants. Then AWS alone decides what they can do: no grants and no session policy apply, and CloudTrail records the person's own identity. See Personal AWS access.
- IAM Identity Center: the person approves FunctionPilot in their AWS access portal (the OAuth device authorization flow) and picks accounts and permission sets. FunctionPilot keeps their Identity Center access token for at most its lifetime (up to 8 hours) to get one-hour role credentials. People who sign in through Identity Center while this is on never get grants.
- Access keys: an IAM user's keys are exchanged for temporary credentials with
sts:GetSessionToken(up to 12 hours, with MFA when the user's policies require it). The secret access key is used once and never stored or logged. Root user keys are refused.
Tokens and temporary credentials are encrypted with a KMS key under an encryption context naming the user, and FunctionPilot's API role may use the key only with that context. Everything is deleted when the person disconnects or the credentials expire. Cached listings and saved tests on a personal connection are shared only by people with the same permission set in the same account, or the same IAM user. If a permission set grants different access per person through session-tag ABAC, use grants instead.
IAM summary
| Role | Assumed by | Permissions |
|---|---|---|
API role (<NamePrefix>-api-<region>) | The API, worker and live tail Lambdas | Its own DynamoDB tables; sts:AssumeRole, sts:SetSourceIdentity and sts:TagSession on roles under /functionpilot/ only; License Manager reads; its log groups; KMS through DynamoDB, and encrypt or decrypt on the personal access key only with a FunctionPilot encryption context |
Local role (/functionpilot/<NamePrefix>-local-<region>) | The API role only, with a source identity | Lambda reads, CloudWatch GetMetricData, tag reads, CloudWatch Logs reads, queries, log group listing and Live Tail, CloudTrail LookupEvents, Compute Optimizer Lambda recommendations, Cost Explorer GetCostAndUsageWithResources. Operate adds lambda:InvokeFunction; Full adds UpdateFunctionConfiguration, UpdateFunctionCode, PublishVersion, alias and reserved concurrency actions, and starting and reading Step Functions executions of state machines whose name contains powerTuning |
Spoke role (/functionpilot/<RoleName>, other accounts) | The API role only, with your external ID and a source identity | As the local role, by its AccessLevel |
| Update notifier role | A daily Lambda (only with UpdateChecks = Enabled) | Its settings and audit items, and publishing to its SNS topic |
| Portal deployer role | A CloudFormation custom resource | Deploy one Amplify app from one file in the artifacts bucket |
| Installer roles | ECS (a one-off task) and a Lambda | Run the installer task, read licences, pull the image, write the artifacts bucket |
Data flows
| Flow | Path | Protection |
|---|---|---|
| Sign-in | Browser, Cognito managed login and your IdP | TLS; SAML signatures or OIDC; authorisation code flow with PKCE |
| API | Browser to API Gateway to the API Lambda | TLS 1.2 or later; a JWT on every call; CORS limited to the portal; throttled |
| AWS calls | API Lambda to STS, then Lambda, CloudWatch, CloudWatch Logs, CloudTrail, Compute Optimizer and Step Functions in any connected account | TLS; per-request, per-user scoped STS credentials with a source identity |
| Live tail stream | Browser to the live tail function URL, then CloudWatch Logs Live Tail in the connected account | TLS; the ID token validated by the function; per-user scoped STS credentials; CORS limited to the portal |
| Scheduled jobs | Worker Lambda to STS, then CloudWatch, CloudWatch Logs and Cost Explorer in the connected accounts | TLS; connection role sessions with the source identity jobs@functionpilot.worker |
| Code download | Browser to a presigned Lambda code URL | Only with code; audited |
| Code viewer and editor | API Lambda to the presigned Lambda code URL, and UpdateFunctionCode for edits | Only with code (reading) or edit (changing); edits audited with the changed paths |
| Licence | Installer and API to AWS License Manager in the hub account | TLS; a read of the account's licences |
| Code install | AWS Marketplace registry to the installer task to the artifacts bucket | Image pulled by digest; SHA-256 manifest; private, TLS-only bucket |
| Update check | Daily read of the public release manifest (optional) | A plain HTTPS GET of a public file; nothing is sent |
The shared cache
CloudWatch charges per metric returned and per GB scanned, so FunctionPilot keeps a shared cache in a
second DynamoDB table: function lists, metrics, findings, Logs Insights results and the scheduled
jobs' results (error groups with a sample message, cold starts, log and Cost Explorer costs), fetched
for a whole Region and shared by every user, plus deployment timelines, memory recommendations and
the code viewer's files. Every read from it is filtered by the caller's permissions exactly as a live
call would be: log-derived data (Insights results, error groups and live tail events) is only served
to callers with logs on that function, and code only to callers with code. The cache never holds
environment variable values, resource policies or test payloads.
Two kinds of item deserve a note. Shared live tail writes the log events of a running session to the cache for about two minutes so other viewers can read them; DynamoDB deletes expired items lazily, usually within days, and they are never served once expired. Code files opened in the code viewer are kept for 30 days. Treat the cache table like the log groups and code it mirrors. It is reachable only by the API role, encrypted like the main table, expires on its own, and can be rebuilt at any time.
What stays in your account
Everything: identities, connections and external IDs, grants, saved tests with their payloads and results, the cache and the audit log. Cloud Certainty runs no service in the data path and receives no telemetry. The vendor's public bucket (templates and the release manifest) and the AWS Marketplace registry are read-only distribution points used at install, at upgrade and, if you leave it on, by the daily update check. Links to cloudcertainty.com in the portal are plain links.
Encryption
- In transit: TLS everywhere; the artifacts bucket denies non-TLS requests; HSTS on the portal.
- At rest: DynamoDB, CloudWatch Logs, the SNS topic and the artifacts bucket use your KMS key when
you set
KmsKeyArn, otherwise AWS owned keys and SSE-S3. Personal access secrets always use a customer managed KMS key (yours, or one the stack creates).
Portal hardening
A strict Content-Security-Policy (no inline or third-party script, frame-ancestors 'none', AWS
endpoints only for sign-in, the API and the live tail Function URL in the stack's Region), Strict-Transport-Security, X-Content-Type-Options,
Referrer-Policy: no-referrer, X-Frame-Options: DENY and a restrictive Permissions-Policy.
Tokens are kept in session storage only. The web app ships without source maps.
Audit
Every administrative change, connection and grant change, configuration change, code edit (with the
changed file paths, never contents), version and alias change, concurrency change, code download,
invocation (without the payload), Power Tuning run, saved test and saved view change, error group
status change and personal access connection is audited with the actor, source IP and target.
Refused changes and invocations are audited too. Events are kept for your plan's audit days (30 to
3,650) in the table, and are also written to the API's CloudWatch log group for your SIEM. CloudTrail
in each account records every AWS call with the person's email as the source identity, or
jobs@functionpilot.worker for the scheduled jobs.
Licensing
FunctionPilot reads its AWS Marketplace licence from AWS License Manager in the hub account, at install and in the API. Nothing about usage is sent anywhere. Without a licence the installer stops and the portal says a licence is required. If License Manager is unreachable, or an active licence disappears (for example while you move between plans), the last active plan keeps working for 72 hours.
Shared responsibility
- Keep
BootstrapAdminEmailon a protected identity with MFA, and grant the Administrator role to a second person. - Set connection roles to the lowest access level that works:
ReadOnlyfor production accounts unless teams need to test there.Fullallows code edits that bypass your deployment pipeline. - Give
codeonly to people who may read the functions' code, andeditonly to people who may change it. - Prefer grants to groups, with function name prefixes per team (
orders-*). - Treat public saved tests like shared documentation: no real customer data or secrets in payloads.
- Forward CloudTrail and FunctionPilot's log groups to your SIEM.
Something unclear or missing? Email support@cloudcertainty.com.