Contents

Security teams should reduce the systems they need to maintain and the entry points attackers can reach. Using managed services where appropriate, simplifying request paths, and addressing the causes of recurring alerts lets teams focus on incidents that require human judgment.

Key Takeaways#

  • Start with administrative ports such as SSH and remove unnecessary public access.
  • Reduce maintenance with managed infrastructure while clearly defining application and access controls.
  • Serve static content through a dedicated delivery path to reduce application load and unnecessary logs.
  • Investigate recurring security alerts before changing detection rules, and use AI to prepare proposed changes for people to review and test.

Close Unnecessary Entry Points#

Every reachable service adds another place to check for vulnerabilities, misconfigurations, and unauthorized access. Start with administrative access. If an EC2 instance allows inbound SSH solely for maintenance, consider using AWS Systems Manager Session Manager.

Session Manager provides access without inbound SSH ports or bastion hosts. It requires appropriate IAM permissions, a working SSM Agent, and connectivity to the necessary AWS service endpoints. Closing port 22 removes that inbound attack path, but you still need to protect the instance and administrative identities.

Follow these steps for one service:

1. Identify public endpoints and security group inbound rules. 2. Configure Session Manager with narrowly scoped permissions and appropriate session logging. 3. Test routine maintenance and emergency access. 4. Remove unnecessary SSH rules and verify that maintenance remains possible.

Hand Off Infrastructure Maintenance#

Moving suitable workloads from EC2 to Amazon ECS on AWS Fargate transfers management of the underlying hosts to AWS. This reduces the team's OS maintenance work. It also changes what the team needs to protect.

Application dependencies, container images, task permissions, secrets, and network settings remain your responsibility. Fargate does not update vulnerable libraries in your images. Before migrating, document the responsibilities AWS takes on and who owns each remaining responsibility.

Choose one stateless service for a pilot migration. Check storage needs, resource requirements, deployment procedures, and expected costs. Rebuild the image with up-to-date dependencies, and test health checks, permissions, logging, and rollback. Expand only after the pilot meets your reliability and security requirements. Migration is useful when it removes more operational work than it adds.

Separate Static Content Delivery#

Serving large static files from application instances makes those instances handle traffic that requires no application processing. Repeated downloads consume bandwidth and processing capacity, and growing logs of routine requests can make investigations harder.

For suitable content, place a private Amazon S3 bucket behind Amazon CloudFront. Keep S3 Block Public Access enabled, and configure CloudFront origin access control with a bucket policy that allows the intended distribution. Verify that users can retrieve objects through CloudFront and cannot bypass it by accessing S3 directly.

Measure application request counts, bytes transferred, cache hit rates, and total costs before and after the change. Savings depend on traffic and configuration. If AWS WAF inspects requests at CloudFront, requests for static content may also incur WAF charges. Caching does not automatically eliminate those charges. Preserve access controls for private content, and review log retention based on the time needed for investigations.

Address the Causes of Recurring Alerts#

Frequent Amazon GuardDuty findings require investigation. They may indicate a compromise, legitimate but risky activity, or expected operations that resemble attacks. Frequency alone does not establish that a finding is harmless.

Review findings from the past 30 days and group them by finding type, affected resource, and recurring activity. For each recurring pattern, verify what happened and assign an owner. Even if an approved scan triggered the finding, exposed credentials or overly broad permissions still need fixing. Resolve the underlying problem wherever possible.

Use suppression only for verified, narrowly defined cases. Record the reason and a review date. Check which GuardDuty protection plans are enabled in each relevant account and Region rather than assuming all workloads have the same protection. Alongside alert counts, track whether analysts can identify and respond to important findings.

Build Review into AI Use#

AI can help draft infrastructure changes, explain unfamiliar settings, and prepare migration and test plans. The supplied source material claims this reduces the effort of improving architecture, but provides no measured savings. Treat any potential speedup as something to validate in your own environment.

Give AI a narrowly scoped task, such as drafting a configuration to serve private S3 content through CloudFront. Before deployment, have a person review permissions, public exposure, failure behavior, and cost assumptions. Test in a non-production environment and ensure a rollback path is available. Evaluate completed changes by the maintenance work they remove and the controls they preserve.

Next Step#

This week, choose one EC2 instance and complete an access review that identifies every inbound rule, who is responsible for managing it, and whether it can be removed.

Source: https://zenn.dev/cscloud_blog/articles/a987163efae5d8

Contents