In the previous post, we have discussed how to write a bash script with AWS CLI to create AWS Lightsail instance. In order to run this script to create AWS Lightsail instance via Azure DevOps we need to make a service connection to AWS from Azure DevOps. Let’s look at the steps to create such service connection.
As the first step you need to create an access key for your user account in AWS. You can go to your profile and click on My Security Credentials to access the Identity and Access Management. Expand Access keys and you can click on Create New Access Key button to create an access key.
The created access key will have two parts Access Key ID and the Secret Access Key. The Secret of the access key is visible only once and you have to save it to a secure location with the access key id.
Then you need to setup AWS Toolkit for Azure DevOps to your Azure DevOps organization. Once the toolkit is installed you can go to service connections of your team project and click on create new service connection.
In the new service connections select AWS and click next. You can provide the access key and the secret, then provide a name for the service connection.
Make sure to select Grant access permissions to all pipelines.
Then save the service connection. This service connection now can be used in build and deployment pipelines to create resources in AWS via Azure DevOps.
In the next post, let’s use this service connection in a release pipeline and create AWS Lightsail instance using the script we have discussed in previous post.
Subscribe to:
Post Comments (Atom)
Popular Posts
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
Sometimes you may need to edit files especially the web.config or appsettings.json files after deploying your application to Azure App Servi...
No comments:
Post a Comment