Skip to main content

AWS Plugin set up to explore services in IntelliJ Idea

This blog will help beginner or advanced AWS developers who utilize AWS services to release products.

We will cover setting up the AWS Toolkit in IntelliJ IDEA and connecting to the AWS service. 

By using this plugin, developers can expedite the development of a product by integrating different services provided by AWS in the project.

Let us focus on a few steps to install the plugin quickly. Please ensure you have installed the IntelliJ IDEA Community or Ultimate edition in a suitable operating system. 

1) File -> Setting -> Plugin window (Windows/Linux) &  IntelliJ IDEA -> Preferences (Mac OS) 

    - Please make sure the marketplace window is opened and search the AWS toolkit will be placed in the list of plugins 

    - Click on a selected plugin Install the plugin and restart IDE after installation.

 Once you restarted IDE you can see one more tab of the AWS Explorer window. You can also open it from View -> Tool Windows -> AWS Explorer.  We will connect to the AWS Account from IDE.

2) Connect to AWS Services from IntelliJ Editor

IntelliJ IDEA detects configuration files automatically If you have installed them on your machine. If you can see No credentials selected, it means you have no credentials in the machine and hence can not select credentials.

Another way to configure credentials is by selecting Edit AWS Credential files and creating a new config by prompt. (File will be located in user/.aws/config directory)

A new configuration file describing credentials will be created at the above location and require the aws_access_key_id and aws_secret_access_key fields.

In the next steps, we will see how to configure credentials from your  AWS account console.


3) Copied credentials in config file from IAM service of AWS to connect from IDE


-
Click Identify access management (IAM) to open to open the IAM service. In this IAM, We will select users from the window that will open the page

with the existing user's list. 


- We will create one new user by selecting the Add users button placed on the right side, then add a username (like test-user) and select the check box of Access key - Programing access to allow you access key ID and secret access key to connect AWS service from IntelliJ IDEA.  Then later, I will continue to Next: Permissions.

 

On the next screen is Permission page will be displayed, the root user will select Attach existing policies directly and choose AdminstratorAccess policy (root user can apply other policies based on requirements of test-user) from the box and select Next: Tags button.

On the next Summary page,  We will ensure that the given details for a user are correct and then click on Create User. 


Once you are done,  you can see the generated IAM user with Access Key ID and  Secret access key which is used to connect AWS service from IntelliJ IDE.



Note that,this Secret access key allows user admin access to an account, please do not share credentials with an untrusted person.


Once you copied credentials in the config file, Open the AWS Explorer window in IntelliJ IDEA and click on the drop-down menu and you can see Profile: default associated with credentials. 


You can select the default profile and IntelliJ IDEA will load all services of AWS in the window.


Now AS toolkit is set up and ready to access the services of AWS. Let's have an example to check how we can use it.

How To access AWS Services from the AWS Explorer window: 


In AWS Explorer, In the first drop-down menu, you can choose the specific account from the list if you have multiple AWS accounts and can switch accounts between them.


The second drop-down menu will help you to choose the specific region of AWS to access service and All regions have all regions available in AWS.


Let's look at a few services of AWS :


S3:


This is widely used and one of my favourite services of AWS Toolkit is the ability to access my S3 buckets in IDE. I am expanding the S3 node to see all available buckets.


You can create a new bucket by right-clicking on the S3 node and clicking on Create S3 Bucket. 


Once you click on a specific bucket from the list, you can see all existing buckets on the right side. From there you can select a bucket to view on screen and download it.

Comments

Popular posts from this blog

Started AWS DynamoDB With Java

Amazon DynamoDB is a versatile NoSQL database service offered by AWS, known for its scalability, performance, and ease of use. This blog post aims to provide a detailed walkthrough of using DynamoDB with Java, covering essential concepts, best practices, and advanced features.  Prerequisites are :  Before starting, ensure you have: AWS Account: Access to AWS services, including DynamoDB. Java Development Environment: JDK installed and configured. AWS SDK for Java: Integrated into your project (via Maven, Gradle, or manually). Getting Started Setting Up Your Development Environment AWS Credentials: Configure AWS credentials for programmatic and SDK access AWS SDK: download dependency in a project to access DynamoDB API  Creating a DynamoDB Table Define Table Schema: Decide on the table name and primary key (partition key and optional sort key). Create Table: Use AWS SDK to create a DynamoDB table programmatically. Advanced Features and Best Practices Handling Throughput ...