AWS S3 Cost Calculator

AWS S3 Cost Calculator. How to estimate S3 Pricing? 

AWS S3 cost is one of the most complicated service when it comes accurately calculating.The total stored objects mainly decides your S3 pricing.S3 service consist of different storage classes like S3 Standard, S3 Intelligent-Tiering, S3 Standard – Infrequent Access, S3 One Zone – Infrequent Access, S3 Glacier, and S3 Glacier Deep Archive, and Reduced Redundancy Storage (RRS).There are per-request fees while you are accessing the data or moving the data around.

 


AWS Lambda Cost Calculator

AWS Lambda Cost Calculator. How to estimate AWS lambda pricing?

  • AWS Lambda pricing is pay only for what you use model.
  • Your Lambda cost is calculated based on number of requests and the duration.
  • The minimum interval is 100 milliseconds.
  • Memory allocation is another parameter for cost. Increase in memory brings increase in CPI available that brings more cost to your function.
  • The AWS Lambda free usage tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month.

 

 

 

apn technology partners

APN Technology Partners and Resources

APN Technology Partners

APN Technology Partners offer solutions for hardware, connectivity services, or software that are integrated with, or hosted on the AWS Cloud.

  • Hardware providers include semiconductor and original equipment manufacturers (OEMs)
  • Software solution providers include SaaS providers and ISVs (Independent software vendors)
  • Connectivity services include network carriers

Being an APN Technology Partner means you get access to various training tools, resources, and support to build, market, sell with the APN.

Top 10 resources for APN Technology Partners

Want to get the most out of your Amazon Web Services (AWS) partnership, but don’t know how to start with it – Read on!

In this blog, we will discuss some of the most relevant APN Technology Partners programs and resources including Software-as-a-Service (SaaS) Providers, Independent Software Vendors (ISVs), telecommunications, and hardware companies. These programs can help you achieve your business goals such as product differentiation, driving demand, growing revenue, acquiring new customers, growing awareness, launching a new product, and creating a competitive advantage. If you want to achieve your business objectives, ensure to work with your APN Partner Development Manager (PDM) and leverage the below-mentioned programs:

#1. AWS Navigate Program

This Amazon program offers an opportunity for APN Partners to build a specialized practice on AWS. It guides APN Partners to become AWS experts and deploy innovative solutions on behalf of AWS customers.

#2. AWS SaaS Factory

You can maximize innovation and agility by building your SaaS solution on AWS. AWS SaaS Factory provides business and technical guidance through workshops and events. It also offers the best practices and architectures references for APN Technology Partners to help build, launch, and scale SaaS solutions on AWS.

#3. AWS Quick Starts

AWS Quick Starts helps you deploy popular solutions on AWS. Each Quick Start is built by APN Partners and AWS solutions architects to deploy key technologies on AWS. It makes use of AWS best practices for security and high availability. These reference architectures help shorten the sales cycle and are designed to help ensure your customers are successful in deploying, using, and scaling your solutions in the AWS Cloud.

#4. AWS Competency Program

This AWS program emphasizes APN Partners who have verified technical proficiency and experienced customer success in specialized solution areas. This Competency program makes APN partners eligible for certain marketing programs and benefits. This also upsurges awareness as AWS Competency Partners are highlighted on the customer-facing AWS Partner Solutions Finder.

 

#5. APN Marketing Central

APN Marketing Central has a wealth of resources for new and established APN Partners. You can use these resources to create marketing campaigns such as banner ads, emails, landing pages, and social media posts as well as leveraging AWS copy blocks and other resources. APN Marketing Central allows you to leverage the AWS brand to drive demand and increase awareness.

#6. AWS Marketplace

It’s basically a directory of software listings from self-sustaining software vendors. These thousands of listings make it easy for APN partners to find, test, buy, and deploy software that runs on AWS. If you want to reach a broader audience and make it easy for your customers to purchase your solution, ensure to get yourself listed on AWS Marketplace.

 

#7. APN Opportunity Registration Portal

If you want to connect with AWS sales in working joint leads and driving revenue growth, you need to submit joint opportunities via the APN Opportunity Management Tool. To submit joint opportunities, you need to login to the APN Opportunity Management tool. Participating in joint marketing programs through APN Registration Portal can also help you get more business leads from AWS.

 

#8. Partner Acceleration Funding Program

The Partner Acceleration Funding Program offers funding. These funding benefits can help you take your business to the next level.  It can speed up various stages of your AWS business development, from technical to sales and marketing enablement. Standard tier and above APN Partners get eligible for funding benefits including Marketing Development Funds (MDF), technical Training and Certifications, and APN Partner opportunity acceleration for the Proof of Concept Program.

 

#9. AWS Training and Certifications

Amazon Web services trainings and certifications help APN Partners to enhance their AWS knowledge and skills, evolve their business, and offer better services to their customers.

 

#10. APN Partner Community

This community gives an opportunity to connect with various AWS community of Systems Integrator (SI) Partners, Managed Service Provider (MSP) Partners, and Technology Partners to explore strategic partnerships and drive new customer growth.

Want to know more about APN Technology Partners and its resources, visit our Amazon Partner Network Directory!

How to create CMKs in Custom Key Store

How to create CMKs in Custom Key Store?

How to create CMKs in Custom Key Store?

Upon the creation of a custom key store, it is possible to now create customer master keys in that key store. Those customer master keys need to be symmetric with key material that the KMS generates. It’s not possible to actually create asymmetric customer master keys or CMKs with any of the imported key material.

You can utilize and manage the customer master keys in the custom key store just exactly as how you would utilize and manage any customer master key in the KMS. As an example, the below options can be made:

  • Utilizing customer master keys for cryptographic operations
  • The setting up of IAM and key policies on customer master keys
  • The creation of aliases which get associated with customer master keys
  • The attachment of tags to customer master keys
  • The enabling and disabling of customer master keys
  • The scheduling of deletions for customer master keys

The creation of a customer master keys in a custom key store, you must first connect the custom key store to its CloudHSM cluster which contains a minimum of two active HSMs in multiple differing Availability Zones. You will need to go to the custom key stores page in Management console in order to discover connection status and HSMs’ number. Along with the API operations, rely on DescribeCustomKeyStores operation for the verification of the connection of custom key store. In order to know the value of active HSMs in cluster, you will need to utilize CloudHSM DescribeClusters operation.

With the creation of a customer master key in the custom key store, KMS is going to create this customer master key in the KMS. However, key material for this customer master key is created in the associated CloudHSM cluster. KMS logs into the cluster with the kmsuser CU you made, and later creates a 25-bit continuous, non-extractable AES symmetric key in this cluster. KMS will choose the value of key label attribute (only visible in the cluster) to ARN of the CMK.

Upon the success of the command, key state of the new customer master key gets Enabled and its takes the origin of AWS_CLOUDHSM (cannot be changed after being created). Once viewing a customer master key in a custom key stor or through the DescribeKey operation, the following can be seen:

  • Typical properties
  • Key ID
  • Key state
  • Creation date
  • Custom key store ID
  • AWS CloudHSM cluster ID

In the attempt of creating a customer master key in the custom key store and it fails, try to head to the error message for getting help in determining what the main cause was.

The following problems may be indicated:

  • The custom key store may not be connected, showing the “CustomKeyStoreInvalidStateException” error message.
  • The associated CloudHSM cluster may not possess the two active HSMs which are needed for your operation, showing the “CloudHsmClusterInvalidConfigurationException” error message.

Creating a Customer Master Key in a Custom Key Store Using the Console:

The below procedure shows the way to creating a CMK in a custom key store.

Step 1.

Login to the Management Console and go to the Key Management Service console through the following link https://console.aws.amazon.com/kms.

Create CMKs in Custom Key Store - Management Console

Create CMKs in Custom Key Store – Management Console

Step 2.

For changing your Region, head to the Region selector from the top-right corner.

Create CMKs in Custom Key Store - Change your region

Create CMKs in Custom Key Store – Change your region

Step 3.

From the navigation pane, select Customer managed keys.

CMK - customer managed keys

CMK – customer managed keys

Step 4.

Click on Create key.

Create CMKs in Custom Key Store - create key

Create CMKs in Custom Key Store – create key

Step 5.

Select the Symmetric

Create CMKs in Custom Key Store - select symmetric option

Create CMKs in Custom Key Store – select symmetric option

It’s not possible to create asymmetric customer master keys in a custom key store.

Step 6.

Click on Advanced options.

 

Step 7.

From the Key material origin field, select “Custom key store (CloudHSM)”.

Create CMKs in Custom Key Store - CloudHSM

Create CMKs in Custom Key Store – CloudHSM

Step 8.

Click on Next.

Step 9.

Choose a custom key store for the newly created customer master key. (For making a new custom key store, you will need to click on Create custom key store)

Create CMKs in Custom Key Store - create custom key store

Create CMKs in Custom Key Store – create custom key store

Create CMKs in Custom Key Store - custom key store

Create CMKs in Custom Key Store – custom key store

The custom key store which you choose will need to have a CONNECTED status. (active associated CloudHSM cluster, with a minimum of two active HSMs from differing Availability Zones)

Step 10.

Click on Next.

 

Step 11.

Fill in a specific alias + optional description for your customer master key.

Create CMKs in Custom Key Store - add labels

Create CMKs in Custom Key Store – add labels

Step 12.

Optional field: From the Add Tags page, start adding some tags to identify and categorize your customer master keys.

Create CMKs in Custom Key Store - add tags

Create CMKs in Custom Key Store – add tags

Upon adding tags to resources, AWS starts generating a cost allocation report (In report there are tags for: usage + total costs)

 

Step 13.

Click on Next.

14. For Key Administrators field, choose which IAM users and roles that are allowed to manage the customer master key.

Create CMKs in Custom Key Store - key administrative permissions

Create CMKs in Custom Key Store – key administrative permissions

Important to know:

IAM policies have the ability to promote other IAM users and roles with permission to utilize customer master keys.

15. Optional field: For the sake of preventing key administrators from deleting this customer master key, leave the box which is located at the bottom empty for the following option: “Allow key administrators to delete this key”.

Create CMKs in Custom Key Store - key deletion

Create CMKs in Custom Key Store – key deletion

Step 16.

Click on Next.

 

Step 17.

For This account section, choose which IAM users and roles found in this AWS account who will get the ability to utilize the customer master key in cryptographic operations.

Create CMKs in Custom Key Store - this account

Create CMKs in Custom Key Store – this account

Important to know:

IAM policies may supply different IAM users and roles with the permission for utilizing the customer master key.

 

Step 18.

Optional field: It is possible for you to give permission to other AWS accounts for using this customer master key for cryptographic operations. If you wish to perform this move, head to the Other AWS accounts section at the bottom, select Add another AWS account and then fill in the specific account identification number of a specified external account. For adding more than one external account, you will need to repeat this same step.

Create CMKs in Custom Key Store - other aws accounts

Create CMKs in Custom Key Store – other aws accounts

Important to know:

Administrators of other accounts need to allow access to the customer master key through the creation of IAM policies for their users.

Step 19.

Click on Next.

 

Step 20.

From Review and edit key policy page, you get the chance to reread and edit the policy document for your new customer master key. Upon completing the revision, select Finish.

Create CMKs in Custom Key Store - review and edit key policy

Create CMKs in Custom Key Store – review and edit key policy

 

  • Upon reaching the finish of the process and it ends in a successful attempt, you will see the new customer master key in the custom key store which you had previously selected.
  • Upon selecting a name or alias for the new customer master key, in its detail page you will find the following:
  • The origin of the customer master key (CloudHSM)
  • The name and the ID of the custom key store
  • The ID of the CloudHSM cluster

– In case of failure in the process, you will get an error message which describes the reason for the failure

Create CMKs in Custom Key Store - CreateKey request failed

Create CMKs in Custom Key Store – CreateKey request failed

Hint:

For easily identifying customer master keys in a custom key store, do the following: From the Customer managed keys page, select and add Custom key store ID column. Select gear icon found in the top right and choose Custom key store ID.

read: S3 Inventory Consistency

Posted in S3
apn consulting partners definition

APN Consulting Partners | Definition

APN Consulting Partners

Did you know?

More than 90% of Fortune 100 companies use APN Partner solutions and services.

AWS Partner Network Consulting Partners help businesses – from SMBs to large organizations, to design, architect, develop, migrate, and manage their applications on Amazon Web Services. Once you’re an APN Consulting Partner, you get access to various managed service providers (MSPs), strategic consultancies, system integrators, value-added resellers, and more.

An APN Consulting Partner can access various training tools, resources, and support to build, market, and sell with the APN.

Benefits of Becoming an APN Consulting Partner

Becoming a member of an APN gives you access to a number of benefits. These include technical and business resources, such as APN-specific content and training opportunities and business planning resources. Some other benefits of becoming an APN Consulting Partner include:

  • Access to ‘Go-to-market’ resources
  • Training & Certification,
  • Market Development Funding (MDF),
  • Innovation Sandbox Credits
  • Increased visibility to AWS customers and AWS field teams

Moreover, APN offers you an opportunity to become a member of an expanding community of Consulting and Technology partners both within the EMEA and globally. It also offers you an opportunity to engage with fellow APN partners to learn best practices from one another and engage in potential opportunities to drive customer success together

Why must you register with APN?

Registering with APN makes you eligible for various benefits such as:

  • Access to APN Partner Central
  • Discount up to 20% on AWS Instructor-led training
  • Access to APN Webcasts
  • Access to various online pieces of training and accreditations such as AWS Technical Professional, AWS Business Professional, and more
  • AWS solution training for partners
  • Eligibility for the AWS SaaS partner program

How to become an APN consulting partner?

As Amazon Partners Network Consulting Partners can help you take your business to the next level, you must be excited to know how to get started with it  – Read on!

APN Consulting Partners’ journey consists of three steps:

  • Step 1: Register
  • Step 2: Select
  • Step 3: Advanced

Register Tier

Register as an APN Partner

Open an account at the APN Partner Central. It’s an APN Portal, where you practically do everything — submitting requests, filling applications, adding customers’ references and so on. You can also track your APN achievements by using the “Partner Scorecard” on the APN Portal.

Once you register with APN Partner Central, you’ll get your APN Partner Central credentials in your email. You will require these credentials to access valuable training, webcasts, best practices, whitepapers, and many more resources. Once you obtain the Register tier, you can apply for the “Select” tier and then for the “Advanced” tier.

Select Tier

Benefits and requirements of Select Tier

Here are some of the benefits that you can achieve by applying for the “Select” tier:

  • Select Partner Logo – You can use this logo on your website, or any of your collateral.
  • AWS Promotional Credits— Once you pay your annual APN program fee, you get $3.5K in AWS credits.
  • APN Marketing Central Access — This gives you an opportunity to access multiple pre-approved and self-served campaigns. This will also give you an opportunity to work with AWS’s recommended digital marketing agency on a customized campaign.
  • AWS Promotional Credits for AWS Certification — You get promotional credits of $300 per Associate Certification and $500 per Professional or Specialty Certification.
  • APN Competency Program — You can apply for the Competency Program. This means you can work on your Advanced status AND competency simultaneously, and save some valuable time!
  • AWS Solution finder – It’s a tool that you can use to search for solutions within the AWS partner’s network.

Once your company gets displayed in the APN Finder, take some time to add beneficial information about your company. Once you co

Select Tier — requirements:

To obtain the ‘Select’ tier, you must fulfill the following requirements:

  • Company Name
  • Country
  • Problem Statement/ Definition
  • Proposed Solution & Architecture (of your company)
  • Start and End Date of Project (approximate)
  • Outcomes of Project & Success Metrics
  • Describe TCO Analysis Performed
  • Lessons Learned
  • Public customers references
  • Direct revenue orlLaunch opportunities
  • Customer satisfaction, and more

To apply for the Advanced tier, you will be needed to share two client references. Make sure to get more than two references as it will save some valuable time later on, and speed up the process.

Advanced tier — benefits and requirements

Obtaining the advanced tier is a MUST. It opens doors to indefinite opportunities that can help your business in so many ways.

Advanced tier — main Benefits:

As an Advanced partner, you get eligible for the following:

  • APN Advanced logo — You get the “Advanced” partner logo, which you can use on your website as well as any of your collaterals.
  • AWS Promotional Credit — You get credits of $5K after making payment of the annual APN program fee).
  • Market Development Funding (MDF) — You get credits of $15K (annually). You get an additional $5k credit if you also have Competency.
  • AWS Promotional Credit for AWS Certification — You get credits of the amount $300 per Associate Certification and $500 per Professional or Specialty Certification.
  • Joint AWS Case Studies — A written/ video case study that shows how your company solves specific challenges of AWS customers.
  • APN Guest Blog Post — You can publish a blog post on the APN blog.
  • Joint Webinars.
  • Access to APN Marketing Central
  • Competency Program – You can apply for the DevOps Competency Program.

Need more information on APN Consulting Partners, stay tuned to our blog!

See Also

Amazon Chime

aws s3 consistency

S3 Inventory Consistency

S3 Inventory Consistency

Not every single object will show in every inventory list.

It gives us consistency for PUTs of:

-New objects

-Overwrites

-DELETEs

Inventory lists may not have objects that are added or deleted at a recent time.

For the validation of object state before taking any action:

-Do a “HEAD Object” REST API request

-Get its metadata

-Check its properties in S3 console

-Check its metadata (with CLI or SDKS)

Inventory Lists’ Location:

Upon the publishing of an inventory list, its manifest files go to the location in the destination bucket below.

 

destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.json

destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.checksum

destination-prefix/source-bucket/config-ID/hive/dt=YYYY-MM-DD-HH-MM/symlink.txt

destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.json

destination-prefix/source-bucket/config-ID/YYYY-MM-DDTHH-MMZ/manifest.checksum

 

  • “destination-prefix”: object key name which can be added from the inventory configuration (used for grouping inventory list files in one common location found in the destination bucket).
  • “source-bucket”:the bucket from which the inventory list was sent.
  • “config-ID”:for the prevention of collisions between reports of various source buckets. It is received from the inventory report configuration (name for the report defined on setup).
  • “YYYY-MM-DDTHH-MMZ”:it’s a timestamp which has a start time and a date of beginning for bucket scan (example: 2020-03-03T20-32Z).
  • “manifest.json”:manifest file.
  • “manifest.checksum”:MD5 of content found in json file.
  • “symlink.txt”:Apache Hive-compatible manifest file.

They are published at a daily or weekly frequency to the location below in destination bucket.

 

destination-prefix/source-bucket/config-ID/example-file-name.csv.gz

destination-prefix/source-bucket/config-ID/example-file-name-1.csv.gz

 

 

  • “destination-prefix”:is the (object key name) prefix set in the inventory configuration. It can be used to group all the inventory list files in a common location in the destination bucket.
  • “source-bucket”:is the source bucket that the inventory list is for. It is added to prevent collisions when multiple inventory reports from different source buckets are sent to the same destination bucket.
  • “example-file-name.csv.gz”:a CSV inventory file.

ORC inventory names: end with “.orc” extension

Parquet inventory names: end with “.parquet” extension

Inventory Manifest:

The manifest files: “manifest.json and symlink.txt” do the following

-Describe the location of inventory files

-Accompany a newly delivered inventory list

-Manifests found in the manifest.json file give metadata and information related to an inventory, which includes the below:

  • “Source Bucket Name”
  • “Destination Bucket Name”
  • “Version of Inventory”
  • “Creation timestamp” (epoch date format: start time + date for the start of bucket scanning
  • “Format + schema” of inventory files
  • “Actual list” of inventory files in destination bucket

manifest.json file gets a manifest.checksum file (as the MD5 of content found in manifest.json file)

Example of a manifest found in a manifest.json file (CSV-formatted inventory):


{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-inventory-destination-bucket",

"version": "2016-11-30",

"creationTimestamp" : "1514944800000",

"fileFormat": "CSV",

"fileSchema": "Bucket, Key, VersionId, IsLatest, IsDeleteMarker, Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, ReplicationStatus, EncryptionStatus, ObjectLockRetainUntilDate, ObjectLockMode, ObjectLockLegalHoldStatus",

"files": [

{

"key": "Inventory/example-source-bucket/2016-11-06T21-32Z/files/939c6d46-85a9-4ba8-87bd-9db705a579ce.csv.gz",

"size": 2147483647,

"MD5checksum": "f11166069f1990abeb9c97ace9cdfabc"

}

]

}

{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-inventory-destination-bucket",

"version": "2016-11-30",

 

Example of a manifest found in a manifest.json file (ORC-formatted inventory):


{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-destination-bucket",

"version": "2016-11-30",

"creationTimestamp" : "1514944800000",

"fileFormat": "ORC",

"fileSchema": "struct<bucket:string,key:string,version_id:string,is_latest:boolean,is_delete_marker:boolean,size:bigint,last_modified_date:timestamp,e_tag:string,

storage_class:string,is_multipart_uploaded:boolean,replication_status:string,encryption_status:string,object_lock_retain_until_date:timestamp,object_lock_mode:string,object_lock_legal_hold_status:string>",

"files": [

{

"key": "inventory/example-source-bucket/data/d794c570-95bb-4271-9128-26023c8b4900.orc",

"size": 56291,

"MD5checksum": "5925f4e78e1695c2d020b9f6eexample"

}

]

}

{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-destination-bucket",

"version": "2016-11-30",

"creationTimestamp" : "1514944800000",

"fileFormat": "ORC",

Example of a manifest found in a manifest.json file (Parquet-formatted inventory):


{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-destination-bucket",

"version": "2016-11-30",

"creationTimestamp" : "1514944800000",

"fileFormat": "Parquet",

"fileSchema": "message s3.inventory { required binary bucket (UTF8); required binary key (UTF8); optional binary version_id (UTF8); optional boolean is_latest; optional boolean is_delete_marker;  optional int64 size;  optional int64 last_modified_date (TIMESTAMP_MILLIS);  optional binary e_tag (UTF8);  optional binary storage_class (UTF8);  optional boolean is_multipart_uploaded;  optional binary replication_status (UTF8);  optional binary encryption_status (UTF8);}"

"files": [

{

"key": "inventory/example-source-bucket/data/d754c470-85bb-4255-9218-47023c8b4910.parquet",

"size": 56291,

"MD5checksum": "5825f2e18e1695c2d030b9f6eexample"

}

]

}

{

"sourceBucket": "example-source-bucket",

"destinationBucket": "arn:aws:s3:::example-destination-bucket",

"version": "2016-11-30",

"creationTimestamp" : "1514944800000",

"fileFormat": "Parquet",

"fileSchema": "message s3.inventory { required binary bucket (UTF8); required binary key (UTF8); optional binary version_id (UTF8); optional boolean is_latest; optional boolean is_delete_marker;  optional int64 size;  optional int64 last_modified_date (TIMESTAMP_MILLIS);  optional binary e_tag (UTF8);  optional binary storage_class (UTF8);  optional boolean is_multipart_uploaded;  optional binary replication_status (UTF8);  optional binary encryption_status (UTF8);}"

-“symlink.txt” Apache Hive-compatible manifest file can’t work with Glue.

-“symlink.txt” with Apache Hive and Apache Spark does not work with ORC and Parquet inventory files.

Knowing an Inventory Is Complete:

-By setting an S3 event notification you can easily get a notice that the manifest checksum file has been created.

-This will let you know that an inventory list was sent to your destination bucket.

-Manifest: up-to-date list showing every single inventory list found in your destination location.

Events get published to:

-A Simple Notification Service (SNS) topic

-A Simple Queue Service (SQS) queue

-A Lambda function

Below is an example of a notification configuration which states that all manifest.checksum files that have recently been added to a given destination bucket will get processed by: Lambda cloud-function-list-write.


<NotificationConfiguration>

<QueueConfiguration>

<Id>1</Id>

<Filter>

<S3Key>

<FilterRule>

<Name>prefix</Name>

<Value>destination-prefix/source-bucket</Value>

</FilterRule>

<FilterRule>

<Name>suffix</Name>

<Value>checksum</Value>

</FilterRule>

</S3Key>

</Filter>

<Cloudcode>arn:aws:lambda:us-west-2:222233334444:cloud-function-list-write</Cloudcode>

<Event>s3:ObjectCreated:*</Event>

</QueueConfiguration>

</NotificationConfiguration>

<NotificationConfiguration>

Athena for Querying Inventory

S3 inventory can be queried through standard SQL by Athena (in every Region that Athena is available at).

S3 inventory files can be queried by Athena in the following formats:

-ORC

-Parquet

-CSV

It’s advised to use ORC-formatted or Parquet-formatted inventory files with Athena querying.

They give: quicker query performance and less query costs.

ORC and Parquet are:

– Self-describing

– Type-aware

– Columnar file formats

– Designed for Apache Hadoop

– Allow the reader to process, read and decompress the current query required columns only.

– Are available in all Regions.

To use Athena for querying S3 inventory follow the steps below:

aws s3 consistency

aws s3 consistency

  1. Start off by creating an Athena table.
aws s3 consistency - athena table

aws s3 consistency – athena table

aws s3 consistency - add athena table

aws s3 consistency – add athena table

This example query has every optional field in an inventory report which is of an ORC-format. Delete whatever optional field not chosen for your inventory. Write the bucket name and the location that you are using, which shows the destination path of your inventory. Example: “ s3://destination-prefix/source-bucket/config-ID/hive/ ” .

aws s3 consistency - input data set

aws s3 consistency – input data set



CREATE EXTERNAL TABLE your_table_name(

`bucket` string,

key string,

version_id string,

is_latest boolean,

is_delete_marker boolean,

size bigint,

last_modified_date timestamp,

e_tag string,

storage_class string,

is_multipart_uploaded boolean,

replication_status string,

encryption_status string,

object_lock_retain_until_date timestamp,

object_lock_mode string,

object_lock_legal_hold_status string

)

PARTITIONED BY (dt string)

ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'

STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat'

OUTPUTFORMAT  'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'

LOCATION 's3://destination-prefix/source-bucket/config-ID/hive/';

For querying a Parquet-formatted inventory report: you must rely on this Parquet SerDe instead of ORC SerDe for the “ROW FORMAT SERDE” statement.

aws s3 consistency - data format

aws s3 consistency – data format

ROW FORMAT SERDE ‘org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe’

 

  1. For adding to the table some more inventory lists, type this “MSCK REPAIR TABLE”

MSCK REPAIR TABLE your-table-name;

  1. When the first two steps are done, start running “ad hoc queries” on your inventory, like the below examples.

# Get list of latest inventory report dates available

SELECT DISTINCT dt FROM your-table-name ORDER BY 1 DESC limit 10;

 


# Get encryption status for a provided report date.

SELECT encryption_status, count(*) FROM your-table-name WHERE dt = 'YYYY-MM-DD-HH-MM' GROUP BY encryption_status;

 


# Get encryption status for report dates in the provided range.

SELECT dt, encryption_status, count(*) FROM your-table-name

WHERE dt > 'YYYY-MM-DD-HH-MM' AND dt < 'YYYY-MM-DD-HH-MM' GROUP BY dt, encryption_status;

# Get list of latest inventory report dates available

 

REST APIs

The below listed are REST operations for S3 inventory:

  • DELETE Bucket
  • GET Bucket
  • List Bucket
  • PUT Bucket

 

how to setup s3 inventory