New to Kestra?
Use blueprints to kickstart your first workflows.
Continuously audit your AWS account-level S3 public access block settings and alert Slack if any protection is disabled.
This sentinel runs on a schedule to verify that all four AWS account-level S3 public access block settings are enabled:
BlockPublicAcls, IgnorePublicAcls, BlockPublicPolicy, and RestrictPublicBuckets. If any setting has drifted to
false, a Slack alert fires immediately with the exact flags that are misconfigured.
io.kestra.plugin.aws.cli.AwsCLI calls aws sts get-caller-identity to resolve the current account ID, then
calls aws s3control get-public-access-block to retrieve the four block flags for that account.true, drift_detected is set to false; otherwise it
is set to true and each individual flag value is emitted as a variable.io.kestra.plugin.core.flow.If branches on drift_detected. When true, a Slack alert lists the exact
misconfigured flags. When false, the flow logs a clean health message and exits.errors block fires a Slack alert if the AWS CLI or any other task throws an unhandled exception.AWS Config can flag this rule, but it requires a separate service, rule set, and notification pipeline. Kestra consolidates the check, the conditional logic, and the Slack alert into a single declarative flow with full execution lineage, retries, and namespace-scoped secret management, no additional infrastructure required.
s3control:GetPublicAccessBlock and sts:GetCallerIdentity permissions.AWS_ACCESS_KEY_ID: AWS access key ID.AWS_SECRET_ACCESS_KEY: AWS secret access key.SLACK_WEBHOOK: Slack incoming webhook URL.AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and SLACK_WEBHOOK to your Kestra namespace secrets.aws_region input to your target region (default: us-east-1).ForEach.aws s3control put-public-access-block when drift is detected.