Cloud

Cloud Security Best Practices: Shared Responsibility, IAM and Encryption

The provider secures the cloud; you secure what you put in it. A practical baseline for identity, encryption, networks, logging, backups and compliance.

  • DivTech editorial team
  • 6 min read
Governance and complianceIdentityNetworkCompute and application
Cloud · part 4 of 5

Cloud providers invest heavily in securing their data centres, hardware and core services. The risks you control sit on your side of the line: storage left publicly accessible, credentials committed to code, over-permissive access, missing multi-factor authentication and unpatched virtual machines. These are within your control and largely preventable with a disciplined baseline.

This guide covers the shared responsibility model, then the practices that matter most: identity and access, encryption, network segmentation, logging, backups and compliance. It is the baseline DivTech applies in cloud consulting projects before a workload goes live.

The shared responsibility model

Every major provider uses a shared responsibility model. The provider secures the cloud itself; you secure what you put in it. Where the line sits depends on the type of service.

ResponsibilityIaaS (virtual machines)PaaS (managed databases, app services)SaaS
Physical data centre, hardware and networkProviderProviderProvider
Virtualisation layer and host OSProviderProviderProvider
Guest OS patchingYouProviderProvider
Runtime and middlewareYouMostly providerProvider
Application codeYouYouProvider
Identity, access and configurationYouYouYou
Your data and its classificationYouYouYou

Look at the last two rows. Identity, configuration and data stay with you whatever the service model, which is why the rest of this article focuses on them. Exact boundaries vary by service, so read each provider's documentation for the services you use.

Identity and access management

In the cloud, identity is the perimeter. Almost everything an attacker could want is reachable through an API call if they hold the right credentials.

  • Enforce MFA for every human user, starting with administrators, and prefer phishing-resistant methods such as passkeys or hardware security keys for privileged accounts.
  • Lock away the root or global admin account: strong MFA, no day-to-day use and an alert on every sign-in.
  • Apply least privilege: grant roles for specific tasks, review them regularly and remove unused permissions. Start narrow rather than from broad admin roles.
  • Use single sign-on and groups: connect cloud access to your identity provider so leavers lose access everywhere at once.
  • Replace long-lived keys: applications and CI/CD pipelines should use roles, workload identities and short-lived tokens instead of static access keys.
  • Separate environments: production in its own account, subscription or project, with tighter access than development.

Encryption and secrets

  • Encrypt data at rest: the major providers encrypt many storage services by default; confirm it for each data store and decide whether compliance requires customer-managed keys.
  • Encrypt data in transit: TLS everywhere, including internal service-to-service traffic where feasible.
  • Manage keys properly: use the provider's key management service, separate who can use keys from who can administer them, and enable rotation.
  • Keep secrets out of code: use a secrets manager, scan repositories and CI logs for leaked credentials and rotate anything exposed immediately.

Network segmentation

Even with strong identity controls, assume something will eventually be compromised and limit how far it can spread.

  • Place databases and internal services in private subnets with no public IP addresses.
  • Allow only required ports from required sources in security groups and firewall rules.
  • Use private endpoints for managed services instead of routing over the internet.
  • Put public applications behind a load balancer with a web application firewall.
  • Reach servers through a bastion host or the provider's session manager, not open SSH or RDP ports.
stackDefence in depth for a cloud workload
L1
Governance and compliance

Policies, guardrails, audits and mapping of controls to frameworks.

L2
Identity

SSO, MFA, least privilege and short-lived credentials.

L3
Network

Private subnets, firewall rules, WAF and private endpoints.

L4
Compute and application

Patching, hardened images, dependency scanning and secure code review.

L5
Data

Encryption, key management, classification and backups.

L6
Detection and response

Central logs, threat detection, alerting and incident runbooks.

DivTech System

Logging, monitoring and detection

You cannot respond to what you cannot see. Enable the provider's audit log (AWS CloudTrail, Azure Activity Log or Google Cloud Audit Logs) in every account, send logs to a central, write-protected location and retain them as long as your compliance obligations require. Turn on native threat detection and security posture management, and alert on high-signal events: root sign-ins, IAM policy changes, storage made public and logging disabled. Connect alerts to an on-call rota. For the application side, see application monitoring and observability.

Backups and recovery

Backups protect against ransomware, accidental deletion and bad deployments, not just hardware failure. Automate them, keep copies in a separate account or with immutability enabled so a compromised administrator cannot delete them, and define recovery point and recovery time objectives for each system. The long-standing 3-2-1 rule is a good guide: at least three copies of important data, on two different types of storage, with one copy kept off-site or in a separate account. Most importantly, test restores on a schedule. An untested backup is a hope, not a plan.

Pipelines and the software supply chain

Your CI/CD pipeline can deploy to production, so it is a high-value target. Give pipelines their own narrowly scoped roles with short-lived credentials (OIDC federation between your CI system and the cloud avoids stored keys), protect the main branch with required reviews, scan dependencies and container images for known vulnerabilities and verify build artefacts where your tooling supports it. Keep base images small and patched, and rebuild them regularly rather than patching running containers by hand.

Compliance

Frameworks such as SOC 2, ISO 27001, HIPAA for US health data, PCI DSS for card payments and GDPR for EU personal data do not make you secure by themselves, but they add structure and evidence. A provider's compliance reports cover only its side of the shared responsibility line. Map each control to your own configuration and automate checks with policy-as-code where possible. Products in healthcare and fintech should plan this from the first sprint.

A 90-day hardening plan

timelineFrom baseline to automation
  1. Weeks 1-2Identity first

    MFA for everyone, lock root and global admin, SSO, remove unused users and keys.

  2. Weeks 3-4Visibility

    Central audit logging, threat detection, posture management and alert routing.

  3. Month 2Network and data

    Private subnets, firewall review, encryption checks, secrets manager and immutable backups.

  4. Month 3Automation and drills

    Policy-as-code guardrails, security scans in CI/CD, a restore test and an incident drill.

Indicative DivTech sequence for a small to mid-size environment. Findings from the first weeks may change the order.

DivTech System

Put this baseline in place before the first wave of any cloud migration, and apply the same controls to every environment if you run multi-cloud or hybrid infrastructure. If you are building AI features, add the risks covered in generative AI security.

Want an independent review of your cloud security posture? DivTech can assess your accounts against this baseline and help close the gaps. Contact us or request a quote.

Frequently asked questions

What is the cloud shared responsibility model?

It splits security duties between the provider and the customer. The provider secures the physical infrastructure and core platform; the customer secures identity, configuration, data and, depending on the service type, operating systems and applications.

What is the single most important cloud security control?

Strong identity controls: MFA for all users, a locked-away root or global admin account and least-privilege access. Many other protections can be bypassed if an attacker obtains powerful credentials.

Is data encrypted by default in the cloud?

Major providers encrypt many storage services at rest by default, but you should confirm it for every data store, enforce TLS in transit and decide whether you need customer-managed keys for compliance.

Does a provider's compliance certification make us compliant?

No. It covers the provider's side of the shared responsibility model. You still need to configure, operate and document your own environment to meet the framework's requirements.

  • Cloud security
  • IAM
  • Encryption
  • Compliance

free consultation

Need help with cloud?

Talk to our Cloud Consulting team. We'll review your situation and suggest a practical next step, free.