securing-aws-lambda-execution-roles

Featured

Securing AWS Lambda execution roles by implementing least-privilege IAM policies, applying permission boundaries, restricting resource-based policies, using IAM Access Analyzer to validate permissions, and enforcing role scoping through SCPs.

DevOps & Infrastructure 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Securing AWS Lambda Execution Roles ## When to Use - When deploying new Lambda functions and defining their IAM execution roles - When remediating overly permissive Lambda roles discovered during security audits - When implementing least-privilege access patterns for serverless architectures - When building reusable IAM templates for Lambda functions across teams - When Security Hub or Prowler reports Lambda functions with excessive permissions **Do not use** for securing Lambda function invocation (use resource-based policies and API Gateway authorizers), for Lambda code security (use SAST tools), or for Lambda network security (use VPC configuration and security groups). ## Prerequisites - IAM permissions for policy creation, role modification, and Access Analyzer operations - AWS IAM Access Analyzer enabled in the account - CloudTrail data events enabled for Lambda to capture actual API usage - Existing Lambda functions to audit and scope permissions for - Understanding of each function's required AWS service interactions ## Workflow ### Step 1: Audit Current Lambda Execution Role Permissions Enumerate all Lambda functions and their associated IAM roles to identify over-privileged functions. ```bash # List all Lambda functions with their execution roles aws lambda list-functions \ --query 'Functions[*].[FunctionName,Role]' --output table # For each function, analyze attached policies for func in $(aws lambda list-functions --query 'Functions[*].FunctionName' ...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category