Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
82
82%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
This reference guide contains detailed information about AWS CloudFormation resources, intrinsic functions, and configurations for IAM infrastructure.
Creates an IAM user for your AWS account.
| Property | Type | Required | Description |
|---|---|---|---|
| UserName | String | Yes | The name of the user |
| Path | String | No | The path for the user name |
| Groups | List of String | No | A list of group names to associate with the user |
| ManagedPolicyArns | List of String | No | A list of managed policy ARNs to attach to the user |
| PermissionsBoundary | String | No | The ARN of the policy used to set the permissions boundary |
| Policies | List of Policy | No | A list of embedded policies to attach to the user |
| Tags | List of Tag | No | A list of tags to attach to the user |
Policy:
PolicyName: String
PolicyDocument: PolicyDocumentPolicyDocument:
Version: String
Statement: List of StatementStatement:
- Sid: String
Effect: String
Principal: Principal
NotPrincipal: Principal
Action: List of String or String
NotAction: List of String or String
Resource: List of String or String
NotResource: List of String or String
Condition: ConditionResources:
AppUser:
Type: AWS::IAM::User
Properties:
UserName: !Sub "${AWS::StackName}-app-user"
Path: /applications/
Groups:
- !Ref AppUserGroup
ManagedPolicyArns:
- arn:aws:iam::aws:policy/ReadOnlyAccess
Policies:
- PolicyName: !Sub "${AWS::StackName}-custom-policy"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:ListBucket
Resource:
- !Ref DataBucketArn
- !Sub "${DataBucketArn}/*"
Tags:
- Key: Environment
Value: !Ref Environment| Attribute | Description |
|---|---|
| Arn | The ARN of the user |
| UserId | The unique identifier for the user |
Creates an IAM role that you can assume to delegate permissions.
| Property | Type | Required | Description |
|---|---|---|---|
| RoleName | String | No | The name of the role |
| AssumeRolePolicyDocument | PolicyDocument | Yes | The policy that grants an entity permission to assume the role |
| ManagedPolicyArns | List of String | No | A list of managed policy ARNs to attach to the role |
| MaxSessionDuration | Integer | No | The maximum session duration in seconds (900-43200) |
| PermissionsBoundary | String | No | The ARN of the policy used to set the permissions boundary |
| Policies | List of Policy | No | A list of embedded policies to attach to the role |
| Description | String | No | A description for the role |
| Tags | List of Tag | No | A list of tags to attach to the role |
Principal:
Service: List of String or String
AWS: List of String or String
Federated: List of String or StringResources:
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Sub "${AWS::StackName}-lambda-role"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
MaxSessionDuration: 3600
Policies:
- PolicyName: !Sub "${AWS::StackName}-dynamodb-policy"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
Resource: !GetAtt DataTable.ArnResources:
CrossAccountRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Sub "${AWS::StackName}-crossaccount"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
AWS: !Sub "arn:aws:iam::${SourceAccountId}:root"
Action: sts:AssumeRole
Condition:
StringEquals:
sts:Externalid: !Ref ExternalId
Policies:
- PolicyName: ReadOnly
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:ListBucket
Resource: "*"| Attribute | Description |
|---|---|
| Arn | The ARN of the role |
| RoleId | The unique identifier for the role |
Creates an IAM policy for an IAM user, group, or role.
| Property | Type | Required | Description |
|---|---|---|---|
| PolicyName | String | Yes | The name of the policy |
| Groups | List of String | No | A list of group names to attach the policy to |
| Roles | List of String | No | A list of role names to attach the policy to |
| Users | List of String | No | A list of user names to attach the policy to |
| ManagedPolicyArns | List of String | No | A list of additional managed policy ARNs to attach |
| PolicyDocument | PolicyDocument | Yes | The policy document |
Resources:
S3ReadPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: !Sub "${AWS::StackName}-s3-read"
Groups:
- !Ref ReadOnlyGroup
Roles:
- !Ref ReadOnlyRole
Users:
- !Ref ReadOnlyUser
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- s3:GetObject
- s3:GetObjectVersion
- s3:ListBucket
Resource:
- !Ref DataBucketArn
- !Sub "${DataBucketArn}/*"| Attribute | Description |
|---|---|
| Arn | The ARN of the policy |
Creates a managed policy that you can attach to multiple users, groups, or roles.
| Property | Type | Required | Description |
|---|---|---|---|
| ManagedPolicyName | String | No | The name of the managed policy |
| Description | String | No | A description of the managed policy |
| Path | String | No | The path for the policy name |
| Groups | List of String | No | A list of group names to attach the policy to |
| Roles | List of String | No | A list of role names to attach the policy to |
| Users | List of String | No | A list of user names to attach the policy to |
| PolicyDocument | PolicyDocument | Yes | The policy document |
Resources:
CustomReadOnlyPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
ManagedPolicyName: !Sub "${AWS::StackName}-custom-readonly"
Description: Custom read-only access policy
Path: /custom/
Groups:
- !Ref AppGroup
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- s3:Get*
- s3:List*
Resource: "*"
- Effect: Allow
Action:
- dynamodb:Get*
- dynamodb:Query
- dynamodb:Scan
Resource: "*"| Attribute | Description |
|---|---|
| Arn | The ARN of the managed policy |
Creates a password for an IAM user. The password allows access to the AWS Management Console.
| Property | Type | Required | Description |
|---|---|---|---|
| UserName | String | Yes | The name of the IAM user |
| Password | String | No | The password for the IAM user |
| PasswordResetRequired | Boolean | No | Whether the user is required to reset their password |
Resources:
ConsoleUser:
Type: AWS::IAM::User
Properties:
UserName: !Sub "${AWS::StackName}-console-user"
UserLoginProfile:
Type: AWS::IAM::UserLoginProfile
Properties:
UserName: !Ref ConsoleUser
Password: !Ref InitialPassword
PasswordResetRequired: trueCreates an access key and secret key for an IAM user.
| Property | Type | Required | Description |
|---|---|---|---|
| UserName | String | Yes | The name of the IAM user |
| Status | String | No | The status of the access key (Active or Inactive) |
| Serial | Integer | No | The serial number for the access key |
Resources:
AppUser:
Type: AWS::IAM::User
Properties:
UserName: !Sub "${AWS::StackName}-app-user"
UserAccessKey:
Type: AWS::IAM::AccessKey
Properties:
UserName: !Ref AppUser
Status: Active
Serial: 1
UserSecret:
Type: AWS::SecretsManager::Secret
Properties:
Name: !Sub "${AWS::StackName}/credentials"
SecretString: !Sub |
{
"access_key": "${UserAccessKey.Ref}",
"secret_key": "{{resolve:secretsmanager:${UserAccessKey.SecretAccessKey}}}"
}| Attribute | Description |
|---|---|
| SecretAccessKey | The secret key for the access key |
| Ref | The access key ID |
Creates an instance profile that can be used to pass an IAM role to an EC2 instance.
| Property | Type | Required | Description |
|---|---|---|---|
| InstanceProfileName | String | No | The name of the instance profile |
| Roles | List of String | Yes | A list of role names to associate with the instance profile |
| Path | String | No | The path for the instance profile name |
Resources:
EC2Role:
Type: AWS::IAM::Role
Properties:
RoleName: !Sub "${AWS::StackName}-ec2-role"
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service: ec2.amazonaws.com
Action: sts:AssumeRole
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
EC2InstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
InstanceProfileName: !Sub "${AWS::StackName}-profile"
Roles:
- !Ref EC2Role
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t3.micro
IamInstanceProfile: !Ref EC2InstanceProfile| Attribute | Description |
|---|---|
| Arn | The ARN of the instance profile |
Adds an IAM user to an IAM group.
| Property | Type | Required | Description |
|---|---|---|---|
| GroupName | String | Yes | The name of the group |
| Users | List of String | Yes | A list of user names to add to the group |
Resources:
DevelopersGroup:
Type: AWS::IAM::Group
Properties:
GroupName: !Sub "${AWS::StackName}-developers"
ManagedPolicyArns:
- arn:aws:iam::aws:policy/ReadOnlyAccess
AppUser:
Type: AWS::IAM::User
Properties:
UserName: !Sub "${AWS::StackName}-developer"
UserGroupMembership:
Type: AWS::IAM::UserToGroupAddition
Properties:
GroupName: !Ref DevelopersGroup
Users:
- !Ref AppUser
- !Ref AnotherUserUploads a server certificate and saves it in IAM.
| Property | Type | Required | Description |
|---|---|---|---|
| ServerCertificateName | String | No | The name for the server certificate |
| CertificateBody | String | Yes | The certificate body |
| PrivateKey | String | Yes | The private key |
| CertificateChain | String | No | The certificate chain |
| Path | String | No | The path for the server certificate |
Resources:
SSLCertificate:
Type: AWS::IAM::ServerCertificate
Properties:
ServerCertificateName: !Sub "${AWS::StackName}-ssl-cert"
CertificateBody: |
-----BEGIN CERTIFICATE-----
MIIDXTCCAkWgAwIBAgIJAJC1HiIAZAiUMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV
BAYTAlVTMRUwEwYDVQQIDAxDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNp
c2NvMRAwDgYDVQQKDAdFeGFtcGxlMRswGQYJKoZIhvcNAQkBFgx1c2VyQGV4YW1w
bGUuY29tMB4XDTIzMDEwMTAwMDAwMFoXDTI0MDEwMTAwMDAwMFowRTELMAkGA1UE
BhMCVVMxFTATBgNVBAgMDENhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lz
Y28xEDAOBgNVBAoMB0V4YW1wbGUxGzAZBgkqhkiG9w0BCQEWDHVzZXJAZXhhbXBs
ZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7fRXEe2x0qJqx
hE4GjKqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJ
DeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG
8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJ
DeU3Q8hZG8U8XjLqPJDeU3Q8hZG8U8XjLqPJDeU3Q8hZG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hZG8U8XjLqPJ
AgMBAAGjUzBRMB0GA1UdDgQWBBTBBXcvR1q3c1B1jZfYvLrYQ5GfAfGA8wDgYD
VR0PAQH/BAQDAgeAMBMGA1UdIwQMMAoECE31k7i4q5+rMA0GCSqGSIb3DQEBCwUA
A4IBAQCk0pHvp8pwh3hUBDqK3x2j5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5
V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9
w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w
3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3
d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d5x3E5V9w3d
-----END CERTIFICATE-----| Attribute | Description |
|---|---|
| Arn | The ARN of the server certificate |
Creates a policy in an organization or in an organizational unit.
| Property | Type | Required | Description |
|---|---|---|---|
| Name | String | Yes | The name of the policy |
| Description | String | No | A description of the policy |
| Type | String | Yes | The type of policy (SERVICE_CONTROL_POLICY, TAG_POLICY, BACKUP_POLICY, AI_SERVICES_OPT_OUT_POLICY) |
| Content | JSON | Yes | The policy content as JSON |
| TargetIds | List of String | No | A list of organizational unit IDs or account IDs to attach the policy to |
Resources:
RestrictiveSCP:
Type: AWS::Organizations::Policy
Properties:
Name: !Sub "${AWS::StackName}-restrictive"
Description: SCP to restrict dangerous operations
Type: SERVICE_CONTROL_POLICY
Content:
Version: "2012-10-17"
Statement:
- Sid: DenyDeleteProduction
Effect: Deny
Action:
- s3:DeleteBucket
- dynamodb:DeleteTable
- rds:DeleteDBInstance
Resource: "*"
Condition:
StringEquals:
aws:ResourceTag/environment: production
- Sid: RequireEncryption
Effect: Deny
Action:
- s3:PutObject
Resource: "*"
Condition:
StringNotEquals:
s3:x-amz-server-side-encryption: AES256Creates a permission set that you can assign to your workforce identities.
| Property | Type | Required | Description |
|---|---|---|---|
| InstanceArn | String | Yes | The ARN of the SSO instance |
| PermissionSetName | String | Yes | The name of the permission set |
| Description | String | No | A description of the permission set |
| SessionDuration | String | No | The duration of the session (ISO 8601 duration format) |
| RelayStateType | String | No | The relay state URL |
| ManagedPolicies | List of String | No | A list of managed policy ARNs |
| InlinePolicy | String | No | An inline policy document |
Resources:
AdminPermissionSet:
Type: AWS::SSO::PermissionSet
Properties:
InstanceArn: !Ref SSOInstanceArn
PermissionSetName: !Sub "${AWS::StackName}-admin"
Description: Administrator access permission set
SessionDuration: PT8H
ManagedPolicies:
- arn:aws:iam::aws:policy/AdministratorAccess
InlinePolicy: |
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["aws-portal:*Billing"],
"Resource": "*"
}
]
}| Attribute | Description |
|---|---|
| PermissionSetArn | The ARN of the permission set |
Assigns access to a principal in a specific AWS account using a permission set.
| Property | Type | Required | Description |
|---|---|---|---|
| InstanceArn | String | Yes | The ARN of the SSO instance |
| PermissionSetArn | String | Yes | The ARN of the permission set |
| PrincipalId | String | Yes | The ID of the principal |
| PrincipalType | String | Yes | The type of principal (USER or GROUP) |
| TargetId | String | Yes | The ID of the AWS account |
| TargetType | String | Yes | The type of target (AWS_ACCOUNT) |
Resources:
AdminPermissionSet:
Type: AWS::SSO::PermissionSet
Properties:
InstanceArn: !Ref SSOInstanceArn
PermissionSetName: !Sub "${AWS::StackName}-admin"
ManagedPolicies:
- arn:aws:iam::aws:policy/AdministratorAccess
AdminAssignment:
Type: AWS::SSO::AccountAssignment
Properties:
InstanceArn: !Ref SSOInstanceArn
PermissionSetArn: !Ref AdminPermissionSet.PermissionSetArn
PrincipalId: !Ref AdminGroupId
PrincipalType: GROUP
TargetId: !Ref TargetAccountId
TargetType: AWS_ACCOUNTCreates an IAM service-linked role for an AWS service.
| Property | Type | Required | Description |
|---|---|---|---|
| AWSServiceName | String | Yes | The service name for which the role is created |
| Description | String | No | A description of the role |
| CustomSuffix | String | No | A custom suffix for the role name |
| SupportedServices | List of String | No | A list of services that can assume the role |
Resources:
AutoScalingServiceRole:
Type: AWS::IAM::ServiceLinkedRole
Properties:
AWSServiceName: autoscaling.amazonaws.com
Description: Service-linked role for Auto Scaling
CustomSuffix: auto-scalingCreates an IAM SAML identity provider.
| Property | Type | Required | Description |
|---|---|---|---|
| SAMLMetadataDocument | String | Yes | The XML metadata document |
| Name | String | No | The name of the SAML provider |
Resources:
SAMLProvider:
Type: AWS::IAM::SAMLProvider
Properties:
Name: !Sub "${AWS::StackName}-saml"
SAMLMetadataDocument: !Ref MetadataDocument| Attribute | Description |
|---|---|
| Arn | The ARN of the SAML provider |
Creates an IAM OpenID Connect provider.
| Property | Type | Required | Description |
|---|---|---|---|
| Url | String | Yes | The URL for the OIDC provider |
| ClientIdList | List of String | No | A list of client IDs |
| ThumbprintList | List of String | No | A list of thumbprints |
| Tags | List of Tag | No | A list of tags to attach |
Resources:
OIDCProvider:
Type: AWS::IAM::OIDCProvider
Properties:
Url: !Sub "https://${OidcProviderEndpoint}"
ClientIdList:
- !Ref ClientId
ThumbprintList:
- !Ref Thumbprint| Condition Key | Type | Description |
|---|---|---|
| aws:SourceIp | IP address | Source IP address of the requester |
| aws:RequestedRegion | String | AWS region requested |
| aws:ResourceTag/tag-key | String | Tag value on the resource |
| aws:PrincipalTag/tag-key | String | Tag value on the principal |
| aws:MultiFactorAuthPresent | Boolean | Whether MFA was used |
| aws:MultiFactorAuthAge | Numeric | Age of the MFA session |
| aws:EpochTime | Numeric | Time of the request |
| aws:CurrentTime | Date | Current time |
| aws:SecureTransport | Boolean | Whether SSL was used |
| Condition Key | Type | Description |
|---|---|---|
| s3:prefix | String | Prefix for ListBucket |
| s3:Delimiter | String | Delimiter for ListBucket |
| s3:x-amz-server-side-encryption | String | Server-side encryption algorithm |
| s3:x-amz-acl | String | Access control list |
| s3:ExistingObjectTag/tag-key | String | Tag on existing object |
| s3:RequestObjectTag/tag-key | String | Tag on object being uploaded |
| Condition Key | Type | Description |
|---|---|---|
| dynamodb:TableName | String | Name of the table |
| dynamodb:Select | String | Select type |
| dynamodb:Attributes | List | Attributes to return |
| dynamodb:ReturnValues | String | Return values type |
| dynamodb:QueryFilter | Map | Query filter conditions |
| Condition Key | Type | Description |
|---|---|---|
| iam:ResourceTag/tag-key | String | Tag on IAM resource |
| iam:PrincipalTag/tag-key | String | Tag on principal |
| iam:AWSServiceName | String | Service name for service roles |
| sts:Externalid | String | External ID for role assumption |
| sts:SourceIdentity | String | Source identity |
| Condition Key | Type | Description |
|---|---|---|
| kms:EncryptionContext:key | String | Encryption context |
| kms:ViaService | String | Service that can use the key |
| kms:GrantConstraintType | String | Type of grant constraint |
| kms:GrantOperations | List | Operations allowed by grant |
Returns the value of an attribute from a resource.
RoleArn: !GetAtt MyRole.Arn
RoleId: !GetAtt MyRole.RoleId
UserArn: !GetAtt MyUser.ArnReturns the value of the specified parameter or resource.
UserName: !Ref MyUser
RoleName: !Ref MyRoleSubstitutes variables in an input string.
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${RoleName}"
PolicyDocument: !Sub |
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::${BucketName}/*"
}]
}Concatenates values into a single string.
ResourceArns: !Join
- ","
- - !GetAtt Table1.Arn
- !GetAtt Table2.ArnReturns a single object from a list.
FirstRoleArn: !Select [0, !Ref RoleArns]# Fn::If
PermissionsBoundary: !If
- HasBoundary
- !Ref BoundaryPolicyArn
- !Ref AWS::NoValue
# Fn::Equals
IsProduction: !Equals [!Ref Environment, production]
# Fn::Not
IsNotDev: !Not [!Equals [!Ref Environment, dev]]
# Fn::And
IsProdAndLarge: !And
- !Equals [!Ref Environment, production]
- !Equals [!Ref InstanceSize, large]
# Fn::Or
IsDevOrStaging: !Or
- !Equals [!Ref Environment, dev]
- !Equals [!Ref Environment, staging]| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole | Basic Lambda execution with CloudWatch Logs |
| arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole | Lambda VPC network access |
| arn:aws:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole | Lambda SQS polling |
| arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole | Lambda Kinesis streaming |
| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore | SSM agent access |
| arn:aws:iam::aws:policy/AmazonSSMFullAccess | Full SSM access |
| arn:aws:iam::aws:policy/AmazonEC2ReadOnlyAccess | EC2 read-only access |
| arn:aws:iam::aws:policy/AmazonEC2FullAccess | Full EC2 access |
| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess | S3 read-only access |
| arn:aws:iam::aws:policy/AmazonS3FullAccess | Full S3 access |
| arn:aws:iam::aws:policy/AmazonS3ObjectReadOnlyAccess | S3 object read-only |
| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess | DynamoDB read-only |
| arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess | Full DynamoDB |
| arn:aws:iam::aws:policy/AmazonRDSReadOnlyAccess | RDS read-only |
| arn:aws:iam::aws:policy/AmazonRDSFullAccess | Full RDS |
| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/ReadOnlyAccess | All read-only access |
| arn:aws:iam::aws:policy/SecurityAudit | Security audit access |
| arn:aws:iam::aws:policy/ViewBilling | View billing information |
| Policy ARN | Description |
|---|---|
| arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy | ECS task execution |
| arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy | EKS worker nodes |
| arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy | EKS CNI plugin |
| arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly | ECR read-only |
| Resource | Default Limit |
|---|---|
| Users per account | 5000 |
| Groups per account | 300 |
| Roles per account | 1000 |
| Policies per account | 1500 |
| Access keys per user | 2 |
| Managed policies attached to role/user/group | 10 |
| Size of inline policy | 10240 characters |
| Size of managed policy | 6144 characters |
| Session duration (roles) | 1-12 hours |
| Element | Limit |
|---|---|
| Statements per policy | 10 |
| Characters per policy document | 10240 |
| Actions per statement | 100 |
| Resources per statement | 100 |
| Condition keys per statement | 10 |
| Error | Cause | Solution |
|---|---|---|
| AccessDenied | Insufficient permissions | Add required actions to policy |
| MalformedPolicyDocument | Invalid policy syntax | Validate JSON syntax |
| ValidationError | Invalid parameter value | Check parameter constraints |
| LimitExceeded | Resource limit reached | Request increase or clean up |
| NoSuchEntity | Resource not found | Verify resource name/ARN |
| ServiceFailure | AWS service error | Retry with backoff |
# Validate template
aws cloudformation validate-template --template-body file://template.yaml
# Check for IAM issues
aws iam get-account-password-policy
aws iam get-account-summaryplugins
developer-kit-ai
skills
chunking-strategy
prompt-engineering
developer-kit-aws
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
references
aws-cloudformation-bedrock
references
aws-cloudformation-cloudfront
references
aws-cloudformation-cloudwatch
references
aws-cloudformation-dynamodb
references
aws-cloudformation-ec2
aws-cloudformation-ecs
references
aws-cloudformation-elasticache
aws-cloudformation-iam
references
aws-cloudformation-lambda
references
aws-cloudformation-rds
aws-cloudformation-s3
references
aws-cloudformation-security
references
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
developer-kit-core
skills
developer-kit-java
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
graalvm-native-image
langchain4j
langchain4j-mcp-server-patterns
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
references
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
unit-test-controller-layer
unit-test-exception-handler
unit-test-json-serialization
unit-test-mapper-converter
unit-test-parameterized
unit-test-scheduled-async
unit-test-service-layer
unit-test-utility-methods
unit-test-wiremock-rest-api
developer-kit-php
skills
aws-lambda-php-integration
developer-kit-python
skills
aws-lambda-python-integration
developer-kit-tools
developer-kit-typescript
skills
aws-lambda-typescript-integration
better-auth
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
scripts
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
references
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
references
shadcn-ui
tailwind-css-patterns
references
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities