Introduction
Have you ever imagined a fully managed service to build mobile and web applications without programming? Yes, you read it right. You are building an application without any programming. Amazon Honeycode is one such tool to make this possible. Let's learn about Amazon Honeycode in this article.
Amazon Honeycode
Amazon Honeycode is a fully managed service that enables us to quickly build mobile and web apps for a team — without programming. We can create Amazon Honeycode apps for almost anything, including project management, customer service, operations, approvals, resources, and even our team.
Use of Honeycode
Spreadsheets are widely used to manage projects and keep track of items. Because spreadsheets aren't designed for collaborative teamwork, this can be time-consuming and error-prone. Honeycode eliminates this problem by providing all the front-end to back-end and data storage necessities. All of this is wrapped up in a simple-to-use visual interface.
Connecting Amazon Honeycode to AWS
We can connect Amazon Honeycode to AWS via the AWS Management Console. We can use the console to link a Honeycode team to an AWS account and upgrade or downgrade our team plans.
Begin by creating an AWS account if you do not already have one. You can connect your AWS account to Honeycode once you have one.
Accessing Developer Tools and APIs
It is no longer necessary to upgrade to a Plus or Pro plan to access developer tools and Honeycode APIs.
AWS Software Development Kit (SDK)
The Amazon Web Services (AWS) Software Development Kit (SDK) is a software library that allows us to interact with the AWS Application Programming Interfaces (APIs). The AWS SDK supports Amazon Honeycode APIs. To use the SDK, you must link the Amazon Honeycode team to any AWS account.
Identity and Access Management (IAM)
AWS Identity and Access Management (IAM) is a service that allows you to control access to AWS resources securely. IAM allows you to manage who is authenticated (signed in) and authorized (has permissions) to use resources.
Authentication
Amazon Honeycode APIs authenticate callers using SigV4. The endpoints reject any request that does not include the authorization header in the HTTP request. When you use the AWS SDK to send your requests, the SDK clients authenticate your requests using the access keys you provide.
Authorization
IAM policies are used to authorize Amazon Honeycode API requests. These IAM policies can specify which actions and resources callers can use.
You can use one of the following managed policies:
- AmazonHoneycodeWorkbookFullAccess
- AmazonHoneycodeFullAccess
You can also write your policies using honeycode:<action-name> actions. See IAM Documentation for more information on policies.
To implement the managed, full-access policy, follow these steps:
- In your AWS account, create a role to grant access to all of your workbooks.
- Make sure the new role has a meaningful name.
- Attach one of the managed policies (AmazonHoneycodeWorkbookFullAccess or AmazonHoneycodeFullAccess) to the newly created role.
- The IAM role is assigned to the Active Directory Service user making the API calls.
Resource ARNs
The format of ARNs is arn:aws:honeycode:AWS_Region:AWS_account_ID:Resource_Type:Resource_Path
Type of Resource
The Resource_type property specifies the type of resource represented by the ARN. Honeycode APIs support the following resource types.
- workbook
- table
- screen
- screen-automation
The path to the resource represented by ARN is indicated by Resource_Path. The workbook resource path begins with workbook/. Each resource type will have a unique path to the resource. For instance, workbook/Workbook ID/table/Table ID, workbook/Workbook ID/app/App_ID/screen/Screen_ID.
It is important to note that creating an IAM policy to grant a user access to a workbook resource does not grant access to all resource types (tables, screens, etc.) in that workbook. You must use wildcards with specific resource types to which you want to grant access, or you must use wildcards on all resource types to give broader access. For example, the wildcard resource ARN below grants users access to all tables in all workbooks but not other resource types such as workbooks or screen-automation.
arn:aws:honeycode:AWS_Region:AWS_account_ID:table:workbook/*
On the other hand, using the wildcard resource ARN prevents the user from accessing any table in any workbook but does not prevent them from accessing other resource types such as workbook, screen, or screen-automation.
If you want to grant or deny access to all resources in a single workbook, use a wildcard resource ARN with * in the Resource Type and Resource Path fields. An example is given below.
arn:aws:honeycode:AWS Region:AWS_account_ID:*:workbook/Workbook_ID*
Authorizing Team Connections
In AWS Console, Honeycode provides actions to view, approve, and reject teams associated with your account. The AWS SDK does not support these actions.
You can use one of the following managed policies:
- AmazonHoneycodeTeamAssociationFullAccess
- AmazonHoneycodeFullAccess
- Alternatively, you can write your policies using honeycode:<action-name> actions.
ListTeamAssociations
This action displays a list of all pending and approved team connection requests for your Amazon Web Services account.
ApproveTeamAssociation
You can use this action to approve a pending team connection request and connect the team to your AWS account. Once you connect your AWS account with Amazon Honeycode, all the bills are done in your AWS account as per the usage.
RejectTeamAssociation
You can reject a pending team connection request with this action.
Interacting with Honeycode workbooks via SDK
Amazon Honeycode has a plethora of APIs that allow you to interact with Honeycode workbooks programmatically. These APIs will enable you to read, write, update, and delete Honeycode workbooks.
Honeycode APIs are broadly classified into four types. Each category contains several APIs.
App Screen APIs
These APIs enable you to interact with Honeycode apps by reading, writing, updating or deleting data stored in Honeycode workbooks. As with any Honeycode app, you have complete control over the data from your workbook exposed to the APIs. The APIs are as follows:
- GetScreenData
- InvokeScreenAutomation
APIs for Table Metadata
These APIs allow you to retrieve table metadata from Honeycode workbooks. The APIs are as follows:
- ListTables
- ListTableColumns
APIs for Table Row Operations
You can use these APIs to read, append, update, or delete data stored in Honeycode table rows. The APIs are as follows:
- ListTableRows
- BatchUpsertTableRows
- QueryTableRows
- BatchDeleteTableRows
- BatchCreateTableRows
- BatchUpdateTableRows
Import APIs
These APIs allow us to import data into Honeycode workbooks' tables and check the status of previously submitted import requests. The APIs are as follows:
- StartTableDataImportJob
- DescribeTableDataImportJob
API tagging
The Honeycode tagging APIs enable you to create, list and delete tags in workbooks, tables, screens, and screen automation. API users can use tagging APIs to manage tags on their resources for tag-based authorization. The APIs are as follows:
- TagResource
- ListTagsForResource
- UntagResource