Back to articles
How to Import Existing AWS Resources into the Serverless Framework (Using CloudFormation Import)
How-ToDevOps

How to Import Existing AWS Resources into the Serverless Framework (Using CloudFormation Import)

via Dev.to DevOpsMubarak Alhazan

Introduction While working on a project to fully transition an application into Infrastructure as Code (IaC), I encountered a challenge that proved more difficult than I expected:  importing existing AWS resources into the Serverless Framework . The application already had several AWS resources created manually over time, including multiple SQS queues used by different services. Since our goal was to have all infrastructure managed through IaC, we needed those existing resources to be managed directly inside our serverless.yml . At first thought, this seemed straightforward. However, I discovered that Serverless Framework does not provide a direct way to import existing resources into a stack. Since Serverless deployments are built on top of AWS CloudFormation , the only reliable way to achieve this is by using CloudFormation’s resource import functionality . Even then, the process can be tricky, and if done incorrectly, it can cause stack drift or even delete existing resources . Beca

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
6 views

Related Articles