Skip to main content

Prerequisites (do this before deploying)

0.1 Authenticate to AWS

The deploy needs valid AWS credentials in your shell. If your session has expired you'll see "Your session has expired ... Please reauthenticate".

  • AWS IAM Identity Center (SSO):
    aws sso login                      # or: aws sso login --profile <your-profile>
    
  • Legacy / custom login wrapper:
    aws login
    

Verify you're authenticated before continuing:

aws sts get-caller-identity

If you use a named profile, export it so radar.py picks it up:

export AWS_PROFILE=<your-profile>
export AWS_REGION=us-east-1

0.2 Python environment

radar.py needs boto3. On externally-managed Python (Homebrew/PEP 668) use a venv:

python3 -m venv .venv
.venv/bin/python -m pip install boto3 "botocore[crt]"

Then run radar with that interpreter, e.g. .venv/bin/python radar.py deploy --dry-run.

0.3 Enable Bedrock model access

The test step (and any real invocation) needs the model enabled in the Bedrock console for your region: Bedrock > Model access > enable anthropic.claude-sonnet-4-20250514-v1:0 in us-east-1. This is a one-time manual grant that the deploy does not perform.


Update Lambda runtime (IMPORTANT) When creating the lambda, use: Runtime: python3.11 Handler: lambda_function.lambda_handler

1.1 Before creating the lambda: create Create the IAM role aws iam create-role
--role-name bedrock-lambda-role
--assume-role-policy-document file://trust-policy.json 1.2. Attach Lambda basic logging aws iam attach-role-policy
--role-name bedrock-lambda-role
--policy-arn arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole 1.3 Attach Bedrock access aws iam attach-role-policy
--role-name bedrock-lambda-role
--policy-arn arn:aws:iam::aws:policy/AmazonBedrockFullAccess 1.4 Attach S3 access (for logging) aws iam attach-role-policy
--role-name bedrock-lambda-role
--policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess 1.5 Get the role ARN (IMPORTANT) aws iam get-role
--role-name bedrock-lambda-role
--query 'Role.Arn'
--output text

you should get something like that arn:aws:iam::<ACCOUNT_ID>:role/bedrock-lambda-role

starting now let's chcek : aws iam get-role --role-name bedrock-lambda-role --query 'Role.Arn' --output text

When all seccusfully created:

  1. Create Lambda (again, clean)
  2. Fix handler issues
  3. Test invocation
  4. Add API Gateway

radar.py — these steps as flags

radar.py deploy automates every step above. Each maps to a named step you can run on its own with --steps or exclude with --skip (see --list-steps):

readme step radar step
1.1 create IAM role role
1.2-1.4 attach policies policies (or --least-privilege for scoped)
create S3 log bucket bucket
Create Lambda + fix handler function
Add API Gateway api
(write config.json) config
Test invocation test (--test-prompt "...")

Examples:

python3 radar.py deploy --dry-run               # preview every step, no AWS calls
python3 radar.py deploy --list-steps            # show steps and what is selected
python3 radar.py deploy --steps role,policies   # just the IAM steps
python3 radar.py deploy --skip test             # everything except the test
python3 radar.py deploy                         # full deploy

Metadata

Release files for aws-bedrock-radar 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-bedrock-radar 0.1.1
File Size Uploaded
aws_bedrock_radar-0.1.1.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-bedrock-radar 0.1.1
File Interpreter ABI Platform
aws_bedrock_radar-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / aws_bedrock_radar-0.1.1.tar.gz

Download URL aws_bedrock_radar-0.1.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
274049a9fbc67039b264b2406dafd20b97bd69cf075fd1ac1fe5b04082a7a851
BLAKE2b-256 checksum
How to use checksums
78ed9e0188e4038f261f64e990dc00cd75eaf8bf4de0004355cd2cb3dfd2c249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / aws_bedrock_radar-0.1.1-py3-none-any.whl

Download URL aws_bedrock_radar-0.1.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22864d77644c7cc920063509510c29af63b4949669a0f8af2787b545079d79a5
BLAKE2b-256 checksum
How to use checksums
a9044a3205f324813b9e61dd95aca0fc4abe21a12e8eed3162f6cbb01027a4df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page