Granting AWS access to nullplatform
Nullplatform uses the AWS API to interact with AWS services and supports various methods to establish secure interaction with AWS.
Required Users/Roles
Nullplatform divides responsibilities into three distinct parts, each requiring specific users or roles:
- Application Management: This component handles the creation of AWS components during application creation or import. The most critical creation is the
ECR repository. - Telemetry: Responsible for processing logs and metrics, communicating with AWS CloudWatch.
- Scope & Deployment Manager: Controls scope and deployment, communicating with AWS EC2, Lambda, and Elastic Load Balancing APIs.
Access Key & Secret Key
While this method is simple, it is NOT recommended, please try cross-account roles instead.
The simplest way to configure nullplatform's communication with the AWS API is by creating AWS users and generating API credentials for each user.
To configure this authentication mode, the required NRN keys are as follows:
-
Application Management:
aws.application_workflow_access_keyaws.application_workflow_secret_access_key
-
Telemetry:
aws.log_reader_access_keyaws.log_reader_secret_access_key
-
Scope & Deployment Manager:
aws.regionaws.scope_workflow_access_keyaws.scope_workflow_secret_access_key
Cross-Account Roles (recommended)
In this approach, instead of using keys and secrets, nullplatform employs Amazon roles. These roles allow you to grant access to specific resources in another AWS account, ensuring that only authorized services (such as nullplatform instances) can connect to AWS.
Nullplatform defines unique roles for each component, which need to be trusted in your AWS account. The roles are as follows:
| Component | Nullplatform Role |
|---|---|
| Application Management | arn:aws:iam::283477532906:role/application_manager |
| Telemetry | arn:aws:iam::283477532906:role/telemetry_manager |
| Scope & Deployment Manager | arn:aws:iam::283477532906:role/scope_and_deploy_manager |
To configure this authentication mode, the required NRN keys are:
-
Application Management:
aws.application_workflow_role- (optional)
aws.application_workflow_role_external_id
-
Telemetry:
aws.log_reader_role- (optional)
aws.log_reader_role_external_id
-
Scope & Deployment Manager:
aws.scope_workflow_role- (optional)
aws.scope_workflow_role_external_id
In all cases, the role is configured in your AWS account.
Granting access to multiple AWS accounts using an intermediate role
In scenarios involving multiple AWS accounts, an intermediate role can be used. Nullplatform first authenticates with the intermediate role, and then uses that role to authenticate with the required component role.
To configure this authentication mode, the required NRN keys are:
-
Application Management:
aws.application_workflow_roleaws.application_workflow_intermediate_role- (optional)
aws.application_workflow_role_external_id - (optional)
aws.application_workflow_intermediate_role_external_id
-
Telemetry:
aws.log_reader_roleaws.log_reader_intermediate_role- (optional)
aws.log_reader_role_external_id - (optional)
aws.log_reader_intermediate_role_external_id
-
Scope & Deployment Manager:
aws.scope_workflow_roleaws.scope_workflow_intermediate_role- (optional)
aws.scope_workflow_role_external_id - (optional)
aws.scope_workflow_intermediate_role_external_id
In all cases, the roles are configured in your AWS account.
Required permissions for each role/user
When a new nullplatform account is set up, our team configures these permissions:
-
Application management
- ECR
ecr-public:BatchCheckLayerAvailabilityecr-public:PutImageecr-public:CompleteLayerUploadecr-public:UploadLayerPartecr-public:InitiateLayerUploadecr:GetDownloadUrlForLayerecr:BatchGetImageecr:CompleteLayerUploadecr:UploadLayerPartecr:InitiateLayerUploadecr:BatchCheckLayerAvailabilityecr:PutImageecr:CreateRepositorysts:GetServiceBearerTokenecr:GetAuthorizationTokenecr-public:GetAuthorizationToken
- ECR
-
Telemetry:
ec2:DescribeInstancescloudwatch:GetMetricDatacloudwatch:ListMetricslogs:Describe*logs:Get*logs:List*logs:StartQuerylogs:StopQuerylogs:TestMetricFilterlogs:FilterLogEvents
-
Scope & Deployment manager:
-
Lambda
lambda:CreateFunctionlambda:DeleteProvisionedConcurrencyConfiglambda:GetFunctionConfigurationlambda:ListProvisionedConcurrencyConfigslambda:GetProvisionedConcurrencyConfiglambda:ListLayerslambda:ListLayerVersionslambda:DeleteFunctionlambda:GetAliaslambda:ListCodeSigningConfigslambda:UpdateFunctionUrlConfiglambda:CreateFunctionUrlConfiglambda:UpdateFunctionEventInvokeConfiglambda:DeleteFunctionCodeSigningConfiglambda:InvokeFunctionUrllambda:ListFunctionslambda:GetEventSourceMappingapigateway:*lambda:ListAliaseslambda:GetFunctionUrlConfiglambda:GetFunctionCodeSigningConfiglambda:UpdateAliaslambda:UpdateFunctionCodelambda:ListFunctionEventInvokeConfigslambda:PutRuntimeManagementConfiglambda:ListFunctionsByCodeSigningConfiglambda:GetFunctionConcurrencylambda:PutProvisionedConcurrencyConfiglambda:ListEventSourceMappingslambda:PublishVersionlambda:DeleteEventSourceMappinglambda:CreateAliaslambda:ListVersionsByFunctionlambda:GetLayerVersionlambda:PublishLayerVersionlambda:GetAccountSettingslambda:CreateEventSourceMappinglambda:GetLayerVersionPolicylambda:PutFunctionConcurrencylambda:DeleteCodeSigningConfiglambda:ListTagslambda:AddPermissionlambda:TagResourcelambda:GetRuntimeManagementConfiglambda:DeleteLayerVersionlambda:PutFunctionEventInvokeConfiglambda:DeleteFunctionEventInvokeConfiglambda:CreateCodeSigningConfiglambda:PutFunctionCodeSigningConfiglambda:UpdateEventSourceMappinglambda:UpdateFunctionCodeSigningConfiglambda:GetFunctionlambda:UpdateFunctionConfigurationlambda:ListFunctionUrlConfigslambda:UpdateCodeSigningConfiglambda:GetFunctionEventInvokeConfiglambda:DeleteAliaslambda:DeleteFunctionConcurrencylambda:GetCodeSigningConfiglambda:DeleteFunctionUrlConfiglambda:GetPolicy
-
Balancer
ec2:DescribeAccountAttributesec2:DescribeAddressesec2:DescribeInternetGatewaysec2:DescribeSecurityGroupsec2:DescribeSubnetsec2:DescribeVpcsec2:DescribeVpcClassicLinkec2:DescribeInstancesec2:DescribeNetworkInterfacesec2:DescribeClassicLinkInstancesec2:DescribeRouteTablesec2:DescribeCoipPoolsec2:GetCoipPoolUsageec2:DescribeVpcPeeringConnectionscognito-idp:DescribeUserPoolClientarc-zonal-shift:*
-
Autoscaling
ec2:DescribeAccountAttributesec2:DescribeAvailabilityZonesec2:DescribeImagesec2:DescribeInstanceAttributeec2:DescribeInstancesec2:DescribeKeyPairsec2:DescribeLaunchTemplateVersionsec2:DescribePlacementGroupsec2:DescribeSecurityGroupsec2:DescribeSpotInstanceRequestsec2:DescribeSubnetsec2:DescribeVpcClassicLinkec2:RunInstancesec2:CreateTagsec2:CreateLaunchTemplateec2:CreateLaunchTemplateVersionec2:DeleteLaunchTemplateec2:DeleteLaunchTemplateVersionsec2:DeleteTags
-
Route53
route53:CreateHostedZoneroute53:ChangeResourceRecordSetsroute53:ListResourceRecordSetsroute53domains:*
-
ECR
ecr:DescribeImagesecr:DescribeRegistryecr:DescribeRepositoriesecr:GetDownloadUrlForLayerecr:ListImagesecr:GetAuthorizationTokenecr:BatchGetImage
-
S3 (for parameters)
s3:PutObjects3:PutObjectAcls3:PutObjectVersionAcls3:PutObjects3:PutObjectAcls3:PutObjectVersionAcls3:GetObject
-
Secrets (for parameters)
secretsmanager:GetSecretValue
-