What is the difference between marshaling and serialization?

Marshaling and serialization are loosely synonymous in the context of remote procedure call, but semantically different as a matter of intent.

In particular, marshaling is about getting parameters from here to there, while serialization is about copying structured data to or from a primitive form such as a byte stream. In this sense, serialization is one means to perform marshaling, usually implementing pass-by-value semantics.

It is also possible for an object to be marshaled by reference, in which case the data “on the wire” is simply location information for the original object. However, such an object may still be amenable to value serialization.


How I passed the AWS Certified Developer – Associate exam

I began studying for the AWS Certified Developer – Associate exam last year after I completed the HBX | Harvard Business School Certificate in Negotiation Mastery. Last year, the CDA exam was the easiest of the three associate exams. That test was re-written. The new version is the hardest of the three associate exams.

AWS is going to retire the old CDA exam in November.

I found out in July. My wife and I are expecting our first child in September. I had to pass quickly or waste a bunch of time studying for a non-existent test.

Last week I passed with an 88% on my first attempt.

Here is how I did it:

From August 2017 – July 2018:

  • Watched a few videos from A Cloud Guru.
  • Worked with AWS as part of my day job.

Two weeks in July 2018:

  • Read the AWS whitepapers.
  • Took the official AWS practice exam and kept screenshots of the test questions to study them later.
  • Signed up for the ACG Exam Simulator.
  • Purchased AWS Certified Developer – Associate practice exams on Udemy.
  • Every day for two weeks I took a practice exam. After each practice exam, I studied what I got wrong. And I wrote down information to help me get the questions right in the future.

The one thing that pulled 90% of the weight was understanding the practice exam questions and answers. Rote memorization isn’t enough. The AWS exam requires a detailed understanding of the underlying concepts. And practice questions are the best guide.

AWS Certified Developer Associate (2017) Study Notes

Here are some (not all) of my notes from studying for the AWS Certified Developer Associate 2017 exam. For those of you trying to pass the 2017 version of the exam, you have until November 2018 to do so.

Note that my notes are very repetitive. They are positively framed. I tried to avoid using negatives like no, none, not, and the prefix un-. That’s a memory trick. And this list of notes won’t be enough to pass the exam.

acloud.guru gets all the credit here. I spent most of my prep time on acloud.guru.

Without further ado, here are my notes:

  • With a global secondary index, the partition and sort keys can both be different from those of the table.
  • A global secondary index is an index with a partition and sort key that can be different from the table’s primary key.
  • A global secondary index is considerd global because queries on the index can span all of the data in a table, across partitions.
  • Web Identity Federation, or WIF, removes the need for creating individual IAM users.
  • With AWS WIF, users can sign into an Identity Provider and obtain temporary credentials from AWS Security Token Service (STS).
  • Elastic Beanstalk has platforms for programming lanuages, web containers, and Docker containers.
  • Frequent EBS snapshots can result in performance degradation.
  • DynamoDB sort key – max length 1024 bytes and min length 1 byte.
  • x-amz-request-id, x-amz-id-2, and x-amz-delete-marker are all common S3 response headers.
  • DownloadBucket, CompleteMultipartUpload, and UploadPart are common S3 API calls.
  • AWS SWF executions can live up to one year.
  • By default, you can have 200 CloudFormation stacks per region. That is a soft limit.
  • 0 bytes is the minimum size of an S3 bucket object.
  • S3 buckets allow empty or touched files.
  • Maximum S3 object size is 5 TB.
  • You must use S3 multipart upload for objects larger than 5 GB.
  • AWS recommends you use the S3 multipart upload for objects larger than 100 MB.
  • A DynamoDB table may contain up to five local secondary indexes and up to five global secondary indexes.
  • DynamoDB partition key maz length is 2048 bytes.
  • S3 has a soft limit of 100 buckets per account.
  • S3 API can return NoSuchBucket 404 Not Found.
  • You can only create one secondary index at a time with DynamoDB.
  • LimitExceededException can come from attempting to create more than one table with a secondary index at a time.
  • To recoup the cost of reserced EC2 instances, sell the unused instances on AWS Reserved Instance Marketplace, or take a snapshot of the EBS volume and terminate the EC2.
  • AWS SWF – Decision tasks occur when the state of the workflow changes.
  • AWS SWF – A server living inside or outside AWS can perform a worker task.
  • AWS SWF – Humans can perform activity tasks.
  • SQS now offers FIFO queues.
  • AWS SQS FIFO queues – queue names will end in the .fifo suffix.
  • SQS messages can be up to 256 KB.
  • SQS messages are billed in 64 KB increments.
  • One DynamoDB table partition can support a maximum of 3,000 read capacity units or 1,000 write capacity units.
  • AWS SQS – ContentBasedDeduplication is supported in FIFO queues.
  • IncompleteSignature and InvalidParameterValue return 400 Bad Request.
  • The minimum visibility timeout of an SQS message is 0 seconds.
  • The conditions section of a CloudFormation template allows you to set up an instance type based on the environment.
  • One strongly consistent DynamoDB requires one read capacity unit.
  • A hash key and a partition key are the same thing.
  • A range key and a sort key are the same thing.
  • JSON errors cause an error during CloudFormation template validation.
  • EC2 API – use AttachVolume to attach an EBS volume to an EC2 instance.
  • DynamoDB uses optimistic concurrency control.
  • BatchWriteItem, when called in a loop, puts or deletes multiple items in one or more table. It also checks for unprocessed items and submits a new BatchWriteItem request with those unprocessed units until all items have been processed.
  • ChangeMessageVisibility – this action changes the visibility timeout of an SQS message.
  • CloudFormation supports JSON and YML.
  • DynamoDB allows conditional writes on PutItem, UpdateItem, and DeleteItem.
  • DynamoDB data plane operations allow CRUD actions on a table’s data.
  • DynamoDB minimum partition key length is 1 byte. DynamoDB maximum partition key length is 2048 bytes.
  • AWS Elastic Beanstalk supports platforms for programming languages like Java, PHP, Python, Ruby, Go.
  • AWS S3 common request headers – Content-Length, Content-Type, and Content-MD5.
  • DynamoDB – to get a list of all your tables, use ListTables.
  • DynamoDB ListTables can only return up to 100 results, so if you have more than 100 tables request paginated results.
  • From within an EC2 instance, cURL to get instance meta data.
  • AWS provides an SDK for C++, Java, Ruby, Python, Go, PHP, iOS, Node.js, .NET, and Android.
  • A dedicated host is required to use your existing Windows Server licences with EC2.
  • To take an application snapshot, first shutdown the EC2 instance and detach the EBS volume.
  • EBS instances can be stopped and restarted without losing any data from the volume.
  • AWS S3 supports website redirects.
  • S3-Standard provides 11-nines durability and 4-nines availability.
  • S3-RRS provides 4-nines durability.
  • S3 bucket names can only contain lowercase letters, periods, dashes, and numbers.
  • AWS S3 supports IPv6.
  • Transferring data between an S3 and an EC2 instance in the same region is free.
  • How to fix an EC2 instance running out of CPU resources? Take an EBS snapshot and redeploy a larger instance type or create an auto-scaling group to add more servers when demand is high.
  • SQS GetQueueAttributes always supports ReceiveMessageWaitTimeSeconds, DelaySeconds, and VisibilityTimeout.
  • DynamoDB read operations – scan, query, BatchGetItem, GetItem, and more.
  • CompleteMultiPartUpload completes and assembles parts of multipart upload.
  • SNS message delivery order is indeterminate.
  • DynamoDB control plane operations let you create and manage tables, and work with indexes, streams, and other objects that depend on tables.
  • DynamoDB data is stored and automatically replicated across mnultiple Availability Zones within a given region.
  • DescribeImages will list the AMIs available in the current region.
  • VPCs and auto-scaling groups are offered for free. Charges will only be incurred for the underlying compute and storage resources.
  • You can have as many CloudFormation templates as you want in a given region.
  • SQS ReceiveMessageWaitTimeSeconds – when set to greater than 0, long polling is enabled.
  • SQS long polling allows SQS to wait until a message is available in the queue before sending a response.
  • SQS short polling continuously polls a queue and can have false positives.
  • SQS long polling reduces the number of poll requests required, reduces the number of false positives, and reduces the number of empty responses.
  • AMIs must be copied into whatever region you want to launch from.
  • SQS visibility timeout is the time during which the message is invisible to queue workers.
  • If an SQS message visibility is set to 0, the message will be immediately available.
  • To speed up the uploads from your app to S3, utilitze S3 transfer acceleration or design your app to use multipart upload.
  • DynamoDB table reads are either eventually consistent or strongly consistent.
  • DynamoDB – PutItem, UpdateItem, and DeleteItem support conditional writes.
  • Conditional writers in DynamoDB – set an expression that must evaluate to true in order for the operation to succeed.
  • Humans can perform an AWS SWF activity task.
  • SWF decision tasks occur when the state of the workflow changes.
  • An SQS request can contain up to TEN individual messages, so long as the total size does not exceed 256 KB.
  • The DynamoDB GetItem operation returns a set of attributes for an item that matches the primary key.
  • The DynamoDB GetItem API call is used to query an item by its primary key.
  • SQS messages are delivered in an indeterminate order unless you are using a FIFO SQS queue.
  • Because each message in SQS may be delivered more than once, your app should be idempotent.

U.S. higher education headed in the wrong direction

  • 61% said that higher education is heading in the wrong direction
  • 84% said that higher education costs are too high
  • 65% said that students are not getting the skills that they need to succeed in the workplace

Source: Pew Research

We are living in strange times when one of my most controversial views enters the mainstream.

People are upset. With tuition prices so high, who can blame them?

This problem reminds me of a story. In my early 20s, I read everything that I could find about finance. I must have read hundreds of books, thousands of articles, and watched hours of videos. I read older books to learn how people used to think. And I read a fascinating anecdote about higher education.

A generation ago, people tried to make it big on Wall Street. Many would fail, but that didn’t matter. Because the ones who failed on Wall Street would go to law school. Lawyers made good money at the time and law school was relatively inexpensive.

Things change. I hear that law school is expensive these days, and jobs are few and far between. But today we have Software Engineering. Most people who try can get software jobs after 6 months of training. A career in software is a golden backup plan.

The best solution, on an individual basis, is to be a smart consumer. We have to be smart consumers of higher education. Here are some higher education best practices:

  • Apply for scholarships
  • Go to an affordable school
  • Focus on learning a marketable skill
  • If you have to work, and can’t afford the luxury of a life of leisure, pick a field that has good job prospects

Above all, think of higher education as an investment. Pay a little, get a lot. Remember that AWS Certified Developer – Associate certificate that I keep mentioning? The cost of the exam and preparation is under $500, and the average salary for those holding the AWS Certified Developer – Associate certificate is $112,984.