<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Arkadiusz Bolewski</title>
    <description>The latest articles on Forem by Arkadiusz Bolewski (@arkbol).</description>
    <link>https://forem.com/arkbol</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F503367%2F691b1cc6-c809-448c-b18e-c02285077470.png</url>
      <title>Forem: Arkadiusz Bolewski</title>
      <link>https://forem.com/arkbol</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/arkbol"/>
    <language>en</language>
    <item>
      <title>Provisioning infrastructure on AWS using Azure DevOps</title>
      <dc:creator>Arkadiusz Bolewski</dc:creator>
      <pubDate>Thu, 02 Sep 2021 23:54:42 +0000</pubDate>
      <link>https://forem.com/aws-builders/provisioning-infrastructure-on-aws-using-azure-devops-3g75</link>
      <guid>https://forem.com/aws-builders/provisioning-infrastructure-on-aws-using-azure-devops-3g75</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This blog post will cover infrastructure deployment on AWS using CloudFormation in combination with Azure DevOps. &lt;/p&gt;

&lt;p&gt;You might ask, why? There are brilliant Code family tools/solutions/services available on AWS. Moreover, if not the toolset that is already available on the best cloud ;) you could pick up something else. &lt;/p&gt;

&lt;p&gt;The answer is pretty simple - I was forced to using it :). I jumped into the multi-cloud project where the team was already heavily using Azure DevOps, so there was no chance to introduce another CI/CD toolset - I had to align. In this blog post, I want to share my experience and write this 'quick start' guide on how to set up the environment to start deployment of your AWS infrastructure using CloudFormation templates. Maybe you are in the same position as I was.&lt;/p&gt;

&lt;h1&gt;
  
  
  Azure DevOps project configuration
&lt;/h1&gt;

&lt;p&gt;If you already have the Azure DevOps project in place, you can skip this part, but if not you please log into the tool and create a new project just like in the picture below. Put a project name and meaningful description. You can also set up additional options like the visibility of your project (public/private) and version control.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z4zj0btrioc7df12umb.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z4zj0btrioc7df12umb.PNG" alt="Azure DevOps project"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After initial project creation, you should create a code repository for your project:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8e46my8z1a5w955wody2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8e46my8z1a5w955wody2.PNG" alt="Azure DevOps Repo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create and configure the pipeline:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbx36ihixrhn50kvzkvy.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbx36ihixrhn50kvzkvy.PNG" alt="Azure DevOps Pipeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have to decide where your code will be stored. In our case, it will be the "Azure Repos Git" option:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rx8116iii5luz75htie.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rx8116iii5luz75htie.PNG" alt="Azure DevOps Pipeline settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pick up your code repository created in the previous step:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2ria1y5ec370u18fjgo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2ria1y5ec370u18fjgo.PNG" alt="Azure DevOps Pipeline settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next screen, you can decide to create a new pipeline YAML file or select an existing one from your code repository. In this example, I'm choosing the first option:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0cco2rhbbmnbif9i34j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx0cco2rhbbmnbif9i34j.PNG" alt="Azure DevOps Pipeline settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the last screen, review your newly created pipeline YAML file and hit the save&amp;amp;run button:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fdxc4xco97kwxr84kc2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6fdxc4xco97kwxr84kc2.PNG" alt="Azure DevOps Pipeline settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; you might end up with a similar error message: &lt;code&gt;No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipelines-parallelism-request&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is applicable only for new accounts. You have to visit the link from the error and submit the request form where you have to provide your name, email address, and your Azure DevOps Organization name:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bn23myjn2fna94rluuz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bn23myjn2fna94rluuz.PNG" alt="Parallelism Request Form"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reason behind this is as follows:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Over the past few months, the situation has gotten substantially worse, with a high percentage of new public projects in Azure DevOps being used for crypto mining and other activities we classify as abusive. In addition to taking an increasing amount of energy from the team, this puts our hosted agent pools under stress and degrades the experience of all our users – both open-source and paid.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After successful pipeline creation you should see a similar view:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzojmsz3h0ldqpnvpgz43.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzojmsz3h0ldqpnvpgz43.PNG" alt="Azure DevOps Pipeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Installation of AWS Toolkit for Azure DevOps extension
&lt;/h1&gt;

&lt;p&gt;At the current stage, our project configuration doesn't allow us to work with AWS services. To make this work, we need to install AWS Toolkit for Azure DevOps extension. This extension will add tasks so we can work with AWS services like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;AWS Elastic Beanstalk&lt;/li&gt;
&lt;li&gt;AWS Elastic Container Registry&lt;/li&gt;
&lt;li&gt;AWS CodeDeploy&lt;/li&gt;
&lt;li&gt;AWS Lambda&lt;/li&gt;
&lt;li&gt;AWS CloudFormation&lt;/li&gt;
&lt;li&gt;Amazon Simple Queue Service&lt;/li&gt;
&lt;li&gt;Amazon Simple Notification Service&lt;/li&gt;
&lt;li&gt;AWS Systems Manager&lt;/li&gt;
&lt;li&gt;AWS Secrets Manager&lt;/li&gt;
&lt;li&gt;AWS CLI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this chapter, I would like to focus only on necessary steps to make this work, but if you would like to know more about this toolkit, please visit &lt;a href="https://docs.aws.amazon.com/vsts/latest/userguide/welcome.html" rel="noopener noreferrer"&gt;official AWS docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install the Toolkit, you have to visit the website &lt;a href="https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-vsts-tools" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-vsts-tools&lt;/a&gt;&lt;br&gt;
and hit the "Get it free" button:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa65nctksvx1ai3zrne6c.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa65nctksvx1ai3zrne6c.PNG" alt="AWS Toolkit for Azure DevOps extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next screen, choose your Organization and click the "Install" button:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw98xyip6r3v7uvv0dnuo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw98xyip6r3v7uvv0dnuo.PNG" alt="AWS Toolkit for Azure DevOps extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In your pipeline edit view on the right-hand side, you have the 'Tasks' panel. Try to filter it by typing 'AWS'. You should see now additional building blocks related to AWS services that you can use in your pipeline configuration.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprktbgzjf7e7zukm6ncd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprktbgzjf7e7zukm6ncd.PNG" alt="Azure DevOps Pipeline tasks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Set up Service Connection to AWS on Azure DevOps
&lt;/h1&gt;

&lt;p&gt;For now, we have DevOps Organization, code repository and some starter pipeline. We still need a service connection between Azure DevOps and our AWS account, where we will deploy our infrastructure. To do this, we can create an IAM user with programmatic access enabled. Please note that the service connection expects long-lived AWS credentials consisting of an access-key and secret-key pair. You can also define Assume Role credentials to scope down the access.&lt;/p&gt;

&lt;p&gt;Navigate to the "Project settings" located on the lower-left side of the screen, next to "Pipelines-&amp;gt;Service connections", and click the "Create service connection". A new panel on the right-hand side should pop up. Chose "AWS" and click "Next":&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpobhwf87ny0oq1fv8224.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpobhwf87ny0oq1fv8224.PNG" alt="Azure DevOps service connection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the next screen, provide connection details. Minimum is Access Key ID and Secret Access Key of your IAM user, but as mentioned earlier, you could use Assume Role credentials as well. When done, click "Save":&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8m8d7vn8npre4fpqtzgr.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8m8d7vn8npre4fpqtzgr.PNG" alt="Azure DevOps service connection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Pipeline file configuration
&lt;/h1&gt;

&lt;p&gt;Now it's time to edit the &lt;code&gt;azure-pipelines.yml&lt;/code&gt; file for our CloudFormation deployments. You could use the web interface and tasks added by the AWS Toolkit extension like building blocks or edit it with the code editor of your choice (like VS Code) if you know the syntax.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd53oh3f37vq6n3mv90s1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd53oh3f37vq6n3mv90s1.PNG" alt="azure-pipelines.yml"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will create two tasks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Upload CloudFormation template to the S3 bucket&lt;/li&gt;
&lt;li&gt;CloudFormation Update/Create stack to deploy the infrastructure&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The code for the first part:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

trigger:
- master

pool:
  vmImage: ubuntu-latest

steps:
- task: S3Upload@1
  inputs:
    awsCredentials: 'AWS'
    regionName: 'eu-west-1'
    bucketName: 'bolewski-cfn'
    sourceFolder: 'source'
    globExpressions: '**'
    targetFolder: 'AWSCommunityBuilders'
    createBucket: true


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;General fields:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;trigger&lt;/code&gt; specifies which branches cause a build to run - in our case "master"&lt;br&gt;
&lt;code&gt;pool&lt;/code&gt; agent pool to use - I'm using the default one "ubuntu-latest"&lt;br&gt;
&lt;code&gt;steps&lt;/code&gt; here is the section where our tasks definitions are located&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For the S3 Upload task:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;awsCredentials&lt;/code&gt; credentials that we've created for service connection&lt;br&gt;
&lt;code&gt;regionName&lt;/code&gt; region of our S3 bucket where we want to upload our CloduFormation template&lt;br&gt;
&lt;code&gt;bucketName&lt;/code&gt; our target S3 bucket name&lt;br&gt;
&lt;code&gt;sourceFolder&lt;/code&gt; from which folder in our code repository we want to move files&lt;br&gt;
&lt;code&gt;globExpressions&lt;/code&gt; basically just filename patterns&lt;br&gt;
&lt;code&gt;targetFolder&lt;/code&gt; prefix (folder) on our S3 bucket where we want to upload files&lt;br&gt;
&lt;code&gt;createBucket&lt;/code&gt; if the bucket doesn't exist shall we create it or not&lt;/p&gt;

&lt;p&gt;There are of course more options, but I highly encourage you to explore them on your own.&lt;/p&gt;

&lt;p&gt;The code for the second task:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

- task: CloudFormationCreateOrUpdateStack@1
  inputs:
    awsCredentials: 'AWS'
    regionName: 'eu-west-1'
    stackName: 'AzureDevOpsDemo'
    templateSource: 's3'
    s3BucketName: 'bolewski-cfn'
    s3ObjectKey: 'AWSCommunityBuilders/network.yml'


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;awsCredentials&lt;/code&gt; credentials that we've created for service connection&lt;br&gt;
&lt;code&gt;regionName&lt;/code&gt; region where we want to deploy our CloudFormation template&lt;br&gt;
&lt;code&gt;stackName&lt;/code&gt; CloudFormation stack name&lt;br&gt;
&lt;code&gt;templateSource&lt;/code&gt; source location for our template, in this case, it's the S3 bucket&lt;br&gt;
&lt;code&gt;s3BucketName&lt;/code&gt; S3 bucket name&lt;br&gt;
&lt;code&gt;s3ObjectKey&lt;/code&gt; location of our template in the S3 bucket&lt;/p&gt;

&lt;p&gt;After some tweaks, the final code looks like below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

trigger:
- master

pool:
  vmImage: ubuntu-latest

variables:
  credentials: 'AWS'
  region: 'eu-west-1'
  bucket: 'bolewski-cfn'

steps:
- task: S3Upload@1
  inputs:
    awsCredentials: $(credentials)
    regionName: $(region)
    bucketName: $(bucket)
    sourceFolder: 'source'
    globExpressions: '**'
    targetFolder: 'AWSCommunityBuilders'
    createBucket: true

- task: CloudFormationCreateOrUpdateStack@1
  inputs:
    awsCredentials: $(credentials)
    regionName: $(region)
    stackName: 'AzureDevOpsDemo'
    templateSource: 's3'
    s3BucketName: $(bucket)
    s3ObjectKey: 'AWSCommunityBuilders/network.yml'


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And the results:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0is7ppfpt0lafvdpmr2e.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0is7ppfpt0lafvdpmr2e.PNG" alt="Azure DevOps finalize job"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1l1j5qerja19dcjj8q7w.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1l1j5qerja19dcjj8q7w.PNG" alt="CloudFormation stack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;As you can see, deployment of the CloudFormation templates is possible even with tools provided by the competitor cloud provider. If you are stuck with the tools you don't like, don't panic, there is always a solution ;). I highly encourage you to play with it on your own, because nothing can replace the hands-on experience. This was a very simple example build from scratch, but I hope it is useful for you.&lt;/p&gt;

&lt;p&gt;If you have any feedback or question, please put a comment or drop me a message.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>azure</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to configure cross-account AWS Backup</title>
      <dc:creator>Arkadiusz Bolewski</dc:creator>
      <pubDate>Wed, 31 Mar 2021 00:17:06 +0000</pubDate>
      <link>https://forem.com/aws-builders/how-to-configure-cross-account-aws-backup-2ca2</link>
      <guid>https://forem.com/aws-builders/how-to-configure-cross-account-aws-backup-2ca2</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This blog post will describe how to set up cross-account AWS Backup. Let's imagine situation where you need to store your cloud backups in one central location, like another AWS account? Maybe because of some compliance or other organizational/contractual reasons. This is where cross-account AWS Backup jump on the stage :)&lt;/p&gt;

&lt;h1&gt;
  
  
  Pre-requisites
&lt;/h1&gt;

&lt;p&gt;First of all you must have at least two accounts that belong to the same organization in the &lt;strong&gt;AWS Organizations&lt;/strong&gt; service. One for backup source and second for desired target location. &lt;/p&gt;

&lt;p&gt;Next you need to &lt;strong&gt;enable cross-account backup&lt;/strong&gt; functionality. By default it's disabled.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foehqk3sqarqrawqrzf88.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foehqk3sqarqrawqrzf88.png" alt="Enable cross-account backup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating Customer Managed Key for backup encryption
&lt;/h1&gt;

&lt;p&gt;For all services except Amazon EFS, cross-account backup only supports customer managed CMKs. It does not support backup vaults that are encrypted using AWS managed CMKs, including default vaults, because AWS managed CMKs are not intended to be shared between accounts that's why we need to create our own key.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e77vzdftu0pssou6g1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e77vzdftu0pssou6g1x.png" alt="Backup Key"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Set up alias, key type and key administrators. For key users we need to pickup IAM Role used by AWS Backup. Last thing is to allow usage of our key with Source account.&lt;/p&gt;

&lt;h1&gt;
  
  
  Create Service Linked Role for AWS Backup (optional)
&lt;/h1&gt;

&lt;p&gt;You might encounter similar error:&lt;br&gt;
&lt;code&gt;The provided role arn:aws:iam::1234567890:role/aws-service-role/backup.amazonaws.com/AWSServiceRoleForBackup cannot be assumed by AWS Backup.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This means you are missing service linked role. AWS Backup uses the service linked role named &lt;strong&gt;AWSServiceRoleForBackup&lt;/strong&gt;. This role provides AWS Backup permission to create backups on your behalf across AWS services. If you have used AWS Backup in the past, most probably you already have it but if don't we can create it running below command:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

aws iam create-service-linked-role --aws-service-name backup.amazonaws.com


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We can use new cool feature to do this - AWS CloudShell&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl6o2nnqajgkgbjvzyvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl6o2nnqajgkgbjvzyvy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create Backup Vaults
&lt;/h1&gt;

&lt;p&gt;Next step is to create Backups Vaults in source and destination accounts where we will copy our backups. Backup vault is a container where you can organize your backups in. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;You must use vaults other than your default vaults to perform cross-account backup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ffpc9xt146nrey1sv21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ffpc9xt146nrey1sv21.png" alt="AWS Backup Vault"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another task to do with Backup Vaults is to set up an &lt;strong&gt;access policy&lt;/strong&gt;. We want to allow access to our Vault from AWS Organizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faejcfgqb6vxyauwqv9i3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faejcfgqb6vxyauwqv9i3.png" alt="Access Policy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Policy JSON should look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8a6zjjep8plc04k13n4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8a6zjjep8plc04k13n4.png" alt="Access Policy details"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to switch to our source account and repeat these steps with creating KMS key and Backup Vault. We need a place to store our encrypted backups before we copy them to the target account.&lt;/p&gt;

&lt;h1&gt;
  
  
  Configure Backup Plans
&lt;/h1&gt;

&lt;p&gt;Next step is to configure Backup Plans. Backup plan is a policy (set of rules) that defines when and how you want to back up your AWS resources. You can assign resources to backup plans and AWS Backup automatically backs up and retains backups for those resources according to the backup plan. You can create multiple backup plans if you have workloads with different backup demands.&lt;/p&gt;

&lt;p&gt;You can pick up from pre-defined templates or create your own plan:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhihd4vrnmczsl86quxt5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhihd4vrnmczsl86quxt5.png" alt="Backup Plan"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configure backup rule by defining schedule, backup window, lifecycle policy, target vault:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrnrqxo8nagk0b2yake5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmrnrqxo8nagk0b2yake5.png" alt="Backup Rule configuration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And what's most interesting, we can define here our copy to destination with copy to another account's vault switch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjr9ah7z7xkomufzu4uq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjr9ah7z7xkomufzu4uq.png" alt="AWS Backup cross account"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's worth to mention that we can have multiple copies.&lt;/p&gt;

&lt;p&gt;When we have defined our backup plan and rules now it's time to assign resources that are going to be backed up:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6ko9wrr0njakh86y9x4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6ko9wrr0njakh86y9x4.png" alt="AWS Backup assign resources"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can assign resources by specific Tags which is very useful and by Resource ID:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno07lwgzdrgbc7c0hfnu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno07lwgzdrgbc7c0hfnu.png" alt="AWS Backup assign resources"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Supported resource types
&lt;/h1&gt;

&lt;p&gt;Unfortunately not all resource types support cross-account and cross-region backup at the same time. One of the example is RDS. You may encounter similar error:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4xsri5ineq5yyzv967k.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4xsri5ineq5yyzv967k.PNG" alt="RDS copy error"&gt;&lt;/a&gt;&lt;br&gt;
I couldn't find any confirmation in official docs that this setup is not supported. I hope AWS team responsible for AWS Backup will work on it and in the near future all resource types will support cross-account and cross-region backup ;-)&lt;/p&gt;

&lt;p&gt;I've worked with below resource types without any issues:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2&lt;/li&gt;
&lt;li&gt;EBS&lt;/li&gt;
&lt;li&gt;EFS (non-default/automatic EFS backup)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Verify your backup and copy jobs
&lt;/h1&gt;

&lt;p&gt;Final thing is to review if your backups are working as planned. Verify backup jobs and copy jobs in your dashboard and troubleshoot any potential misconfigurations/issues:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesuuqbsqn7cmh1g3ru8o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesuuqbsqn7cmh1g3ru8o.png" alt="AWS Backup Dashboard"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwxfce5uv7tvgeck6x5m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmwxfce5uv7tvgeck6x5m.png" alt="Copy Jobs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Next steps
&lt;/h1&gt;

&lt;p&gt;There is always space for improvement :). If you would like to experiment more with AWS Backup you might want to try centralized management and creating Backup Policies across your AWS Organization.&lt;/p&gt;

&lt;p&gt;If you have any additional questions or spot any error please feel free to contact me!&lt;/p&gt;

&lt;p&gt;P.S. Always test your backups.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>backup</category>
      <category>howto</category>
    </item>
    <item>
      <title>AWS SSO with Azure Active Directory</title>
      <dc:creator>Arkadiusz Bolewski</dc:creator>
      <pubDate>Tue, 03 Nov 2020 02:07:43 +0000</pubDate>
      <link>https://forem.com/aws-builders/aws-sso-with-azure-active-directory-pjp</link>
      <guid>https://forem.com/aws-builders/aws-sso-with-azure-active-directory-pjp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Recently in one of my project we had to setup AWS SSO with Azure AD as our primary identity provider. There are couple good reads available on the web like &lt;a href="https://aws.amazon.com/blogs/aws/the-next-evolution-in-aws-single-sign-on/" rel="noopener noreferrer"&gt;this one&lt;/a&gt; from 2019 but things are changing dynamically, so they are quickly becoming outdated. This is the reason why I decided to write my own detailed guide!&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-requisites
&lt;/h2&gt;

&lt;p&gt;Before we start we need two pieces in place which are not described in this guide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure Active Directory&lt;/li&gt;
&lt;li&gt;AWS SSO&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Add Enterprise Application on Azure
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go to your Azure subscription. Navigate to &lt;strong&gt;Azure Active Directory&lt;/strong&gt;, next in the menu on the left hand side click &lt;strong&gt;Enterprise applications&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc038367oicqy3v4t8nq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc038367oicqy3v4t8nq5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;New application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqli1mjsdjdc2jp2uol1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqli1mjsdjdc2jp2uol1u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Create your own application&lt;/strong&gt;, add meaningful name, check &lt;strong&gt;Integrate any other application you don't find in the gallery&lt;/strong&gt; and click &lt;strong&gt;Create&lt;/strong&gt; when ready&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjsxk2vzpmy88mudd9s6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fjsxk2vzpmy88mudd9s6n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We have created our Enterprise application, now let's go back to our AWS account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F67odqe9v140lwpraolam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F67odqe9v140lwpraolam.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Configure AWS SSO with external identity provider
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Log into your AWS account, navigate to AWS SSO service and click &lt;strong&gt;Choose your identity source&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffjwgp0rids3dzmfydp1v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffjwgp0rids3dzmfydp1v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Under &lt;strong&gt;Identity source&lt;/strong&gt; settings, click &lt;strong&gt;Change&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4tdipepg62806yf4wqd1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4tdipepg62806yf4wqd1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You will be redirected to the new page with additional settings. On that page choose &lt;strong&gt;External identity provider&lt;/strong&gt;. Scroll down to &lt;strong&gt;Service provider metadata&lt;/strong&gt; section and click &lt;strong&gt;Download metadata file&lt;/strong&gt;. We are going to upload this file to our Azure application.  Leave this page open, we will need it later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5gwp9ebw6qas4jqn3iii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5gwp9ebw6qas4jqn3iii.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now let's go back to our Enterprise application on Azure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configure Enterprise application
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Navigate to the previously created Enterprise application and click &lt;strong&gt;Setup single sign on&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7tolbn5r266darhx8o8u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7tolbn5r266darhx8o8u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On next page choose &lt;strong&gt;SAML&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7h8unfar0pf9077f6c4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7h8unfar0pf9077f6c4b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Upload metadata file downloaded from AWS SSO configuration and click &lt;strong&gt;Save&lt;/strong&gt; on next dialog.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4p4wlty5kjnli29h2aju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4p4wlty5kjnli29h2aju.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now you should see the link to download &lt;strong&gt;Federation Metadata XML&lt;/strong&gt; file which we will upload to AWS SSO as &lt;strong&gt;IdP SAML metadata&lt;/strong&gt; (you didn't close it, right? (: ). If you can't see the link, please &lt;strong&gt;refresh&lt;/strong&gt; the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftnvcv8s9ko5278lzndsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftnvcv8s9ko5278lzndsw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Finish AWS SSO configuration
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Go back to the AWS SSO configuration page and upload &lt;strong&gt;Federation Metadata XML&lt;/strong&gt; file from Azure as &lt;strong&gt;IdP SAML metadata&lt;/strong&gt;. Click &lt;strong&gt;Review&lt;/strong&gt; when ready.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu6crbb56eq9tsvnyl2gi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu6crbb56eq9tsvnyl2gi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Carefully read warning message. When ready write &lt;strong&gt;ACCEPT&lt;/strong&gt; in the text box and click &lt;strong&gt;Change identity source&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0zhd7y70g7lacn54ng4v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0zhd7y70g7lacn54ng4v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congrats! You have configured AWS SSO with AzureAD as your main identity provider. Now let's configure automatic provisioning of your users and groups.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enable automatic provisioning
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Navigate to &lt;strong&gt;AWS SSO&lt;/strong&gt; console, click &lt;strong&gt;Settings&lt;/strong&gt; and then click &lt;strong&gt;Enable identity synchronization&lt;/strong&gt; link. New dialog will open with your &lt;strong&gt;SCIM endpoint&lt;/strong&gt; address and &lt;strong&gt;Access token&lt;/strong&gt;. Copy these values, you will need them later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzpiba6fs961j4omix6v2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzpiba6fs961j4omix6v2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let's go back to Azure portal. Navigate to your Enterprise application and click &lt;strong&gt;Provisioning&lt;/strong&gt; on the left hand side menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyxwshmp9x5i2s71v96qa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyxwshmp9x5i2s71v96qa.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;strong&gt;Provisioning mode&lt;/strong&gt; to &lt;strong&gt;Automatic&lt;/strong&gt;. Provide &lt;strong&gt;Tenant URL&lt;/strong&gt; (SCIM endpoint) and &lt;strong&gt;Secret Token&lt;/strong&gt; (Access token). You can click &lt;strong&gt;Test Connection&lt;/strong&gt; button to verify if Azure can establish connection with SCIM endpoint.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flvao2jzz535jhlplfdq5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flvao2jzz535jhlplfdq5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Mappings&lt;/strong&gt; section will be available as soon as you hit &lt;strong&gt;Save&lt;/strong&gt; button with your SCIM endpoint and Access token fields populated. It's good idea to set up &lt;strong&gt;Notification Email&lt;/strong&gt; field so you will get notified if you synchronization fails. You can set &lt;strong&gt;Provisioning Status&lt;/strong&gt; to &lt;strong&gt;On&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzf45jja71nt1dfqtcncu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzf45jja71nt1dfqtcncu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; AzureAD allows you to create user without First Name and Last Name defined but AWS SSO won't like it. Please pay attention to any synchronization errors.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Last but not least is to define our users and groups that we want to be synchronized from AzureAD to AWS SSO. To do this navigate to your Enterprise application, click &lt;strong&gt;Users and Groups&lt;/strong&gt; in the left hand side menu and then &lt;strong&gt;Add user&lt;/strong&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxkntga5salv6ojrin7af.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxkntga5salv6ojrin7af.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can now login to your AWS accounts using AWS SSO &lt;strong&gt;User portal URL&lt;/strong&gt; or myapplications.microsoft.com webpage.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Closing remarks
&lt;/h2&gt;

&lt;p&gt;Hope you will find this guide useful.&lt;/p&gt;

&lt;p&gt;I would like to thank my team mate Guru for help with the screenshots! ;)&lt;/p&gt;

</description>
      <category>aws</category>
      <category>azuread</category>
      <category>sso</category>
    </item>
  </channel>
</rss>
