Deploy production ECS instances with security hardening and MLPS 2.0 compliance baselines, then establish private PKI infrastructure to automate the full certificate lifecycle (issuance, deployment, rotation, revocation) for those compliant workloads.
Use this workflow when deploying production ECS workloads that require MLPS 2.0 compliance and automated internal mTLS. It combines Alibaba Cloud Linux hardening with a private PKI to enforce encrypted, zero-trust service-to-service communication across your VPC without manual certificate handling.
aliyun ecs RunInstances with SecurityGroupId pointing to a restricted SG. Set ImageId=alinux_3_x64_20G_alibase_*.qcow2 and InstanceType=ecs.c7.large.aliyun ecs RunCommand --InstanceId i-xxx --CommandContent "bash /usr/local/alinux-compliance/apply-baseline.sh --profile mlps2.0_prod" to enforce kernel hardening and audit policies.aliyun cas CreatePrivateCA --Name "Internal-Root-CA" --Algorithm "RSA_2048" --ValidityPeriod 3650. Capture the returned CaId.aliyun cas IssuePrivateCertificate --CaId <CaId> --CommonName "*.internal.vpc" --SubjectAlternativeNames "svc-a.internal.vpc" --Validity 365. Note CertificateId.aliyun cas DeployCertificateToServer --CertificateId <CertificateId> --InstanceId i-xxx --CertPath "/etc/pki/tls/certs/svc.pem" --KeyPath "/etc/pki/tls/private/svc.key".aliyun cas SetAutoRenewal --CertificateId <CertificateId> --AutoRenew true --RenewDays 30. Revoke compromised certs via aliyun cas RevokeCertificate --CertificateId <ID> --Reason "KEY_COMPROMISE".Alibaba Cloud Linux applies OS-level MLPS 2.0 baselines directly on the ECS compute layer. ECS manages VPC routing, ENIs, and security group enforcement. CAS operates as the centralized private PKI, issuing certificates, pushing them to ECS via the DeployCertificateToServer API, and orchestrating lifecycle events. Data flows from CAS → ECS (cert/key payloads), while ECS security groups and alinux compliance agents validate traffic and system state before permitting mTLS handshakes.
AliyunECSFullAccess and AliyunCASFullAccess/etc/pki/... without chmod 600 causes service startup failures due to unreadable private keys.MinProtocol exceeds the certificate’s supported cipher suite.RenewDays too low (<15) overlaps with compliance scans, triggering false-positive audit failures.