AWSCodeDeployRoleForLambda
Summary
Provides CodeDeploy service access to perform a Lambda deployment on your behalf.
Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.
Identity
- ARN
arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambda- Default version
- v3
- Created
- Last edited
- Services
- cloudwatch, lambda, s3, sns
Control-plane actions (4)
By access level: 3 Read, 1 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CloudWatch | 1 of 160 | 1 Read; 0 restricted, 0 conditional | cloudwatch:DescribeAlarms |
| Lambda | 3 of 121 | 2 Read, 1 Write; 0 restricted, 0 conditional | lambda:GetAlias, lambda:GetProvisionedConcurrencyConfig, lambda:UpdateAlias |
CloudWatch: 1 actions
- cloudwatch:DescribeAlarms (Read)
Lambda: 3 actions
- lambda:GetAlias (Read)
- lambda:GetProvisionedConcurrencyConfig (Read)
- lambda:UpdateAlias (Write)
Data-plane actions (4)
By access level: 2 Read, 2 Write.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| Lambda | 1 of 14 | 1 Write; 1 restricted, 0 conditional | lambda:InvokeFunction |
| S3 | 2 of 25 | 2 Read; 2 restricted, 0 conditional | s3:GetObject, s3:GetObjectVersion |
| SNS | All 1 actions (see the SNS page) | 1 Write; 0 restricted, 0 conditional | sns:Publish |
Lambda: 1 actions
- lambda:InvokeFunction (Write)
S3: 2 actions
- s3:GetObject (Read)
- s3:GetObjectVersion (Read)
Excluded and conditional actions
No patterns are excluded by NotAction or Deny statements.
Resource scope and attachment
Resource scope across granted actions: mixed.
Can be attached: Yes, to users, groups and roles.
Why this tier
- Grants 3 write, tagging or permissions-management actions, short of full control of any service.
Guidance
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Related policies
Same service
- AccessAnalyzerServiceRolePolicy
- AdministratorAccess-AWSElasticBeanstalk
- AmazonAppFlowFullAccess
- AmazonApplicationRecoveryControllerRegionSwitchPlanExecutionPolicy
- AmazonAppStreamServiceAccess
- AmazonAthenaServiceRolePolicy
- AmazonAuroraDSQLReadOnlyAccess
- AmazonBedrockStudioPermissionsBoundary
Same domain
- AmazonSageMakerPartnerServiceCatalogProductsApiGatewayServiceRolePolicy
- AmazonSageMakerPartnerServiceCatalogProductsCloudFormationServiceRolePolicy
- AWSApplicationAutoscalingLambdaConcurrencyPolicy
- AWSCodeDeployRoleForCloudFormation
- AWSCodeDeployRoleForLambdaLimited
- AWSContinuumCollectorServiceRolePolicy
- AWSLambda_FullAccess
- AWSLambda_ReadOnlyAccess
Frequently asked questions
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Policy JSON
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"cloudwatch:DescribeAlarms",
"lambda:UpdateAlias",
"lambda:GetAlias",
"lambda:GetProvisionedConcurrencyConfig",
"sns:Publish"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": "arn:aws:s3:::*/CodeDeploy/*",
"Effect": "Allow"
},
{
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"s3:ExistingObjectTag/UseWithCodeDeploy": "true"
}
},
"Effect": "Allow"
},
{
"Action": [
"lambda:InvokeFunction"
],
"Resource": "arn:aws:lambda:*:*:function:CodeDeployHook_*",
"Effect": "Allow"
}
]
}
Version history
Current version v3, edited by AWS on 2019-12-03. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.
Attach snippets
AWS CLI
aws iam attach-role-policy --role-name ROLE_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambda
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambda
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambdaCloudFormation
Resources:
ExampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: {} # replace with your trust policy
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambdaTerraform
resource "aws_iam_role_policy_attachment" "service_role_awscodedeployroleforlambda" {
role = aws_iam_role.example.name
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSCodeDeployRoleForLambda"
}CDK (TypeScript)
role.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName("service-role/AWSCodeDeployRoleForLambda"),
);Sources
Pending editorial review. No editorial sources are listed yet.