You may occasionally wish to allow an assumed IAM role, such as a role assumed via an EC2 instance profile, to assume another role. This is described in inÂ Switching to an IAM Role (AWS CLI) as “role chaining“. If we wish for role A to be able to assume role B, for example, we must add a statement to the “trust policy” in role B, like this:
On the EC2, assumed role A will start out looking something like this:
$ aws sts get-caller-identity
Despite the fact that this is an assumed role and looks different from the Principal for role A which we referenced in our trust policy, it will still be allowed to assume role B.
When switching to version 2 of the KCL Java library and using the “Enhanced Fan-Out” consumer mode, it was difficult to determine the appropriate IAM policy because the AWS documentation did not mention any differences between the old consumer and the new consumer. However, by trial and error, a policy like the one below (though with your own account id) may be reasonable. Of course, you could also split out specific actions to more specific resources, but this is a reasonable first draft.
Go requires me to check out all repos which use Go into its special snowflake folder structure? Uggghhhh.
“Checkout” is a noun. “Check out” is a verb (specifically a “phrasal verb”).
“Setup” is a noun. “Set up” is a verb.
“How to setup X”
“First, setup X”
“Checkout the git repo.”
“For more info, checkout the documentation on the wiki.”
“How to set up X”
“First, set up X”
“Check out the git repo.”
“For more info, check out the documentation on the wiki.”
“That’s a great set up.” (You have a great set which is up?)
“Maybe the check out failed.”
“That’s a great setup.”
“Maybe the checkout failed.”
Have you ever wondered whether AWS CloudWatch percentile metrics remain accurate as the granularity of data is increased over time? I asked AWS about this, and apparently the answer is yes, they do, but they won’t tell me exactly how. A trade secret, perhaps.
I recently had some trouble deploying an app to AWS after enabling HTTPS/TLS on the application because the health check was failing. It turned out that because I had also restricted the list of ciphers my app could use (per my organization’s security recommendations), the ELB was unable to connect to the app because it did not support any of my app’s ciphers. Unfortunately, the AWS docs do not explain what ciphers are supported between a classic ELB and the app. So, here’s the current list:
In going through A. Albert Klaf’s Calculus Refresher, republished by Dover, I came across a mistake in Appendix A. The answer to question 7 on page 88 is incorrect. The question is:
7. What are the most economical dimensions of a right circular cylindrical tank made of steel of uniform thickness and of fixed volume = 6,000 cu. ft.?
And the answer given in Appendix A, p377 is:
7. r = h = 12.41 ft
However, that would give:
V = 6004.3392
dA/dr = 78.0307
I believe the correct answer is:
r = 9.8475
h = 19.6949
A = 1827.8966
If you notice any other errors in this book, let me know in the comments.
Getting this exception when creating a custom XPathRule in a PMD ruleset file?
Oct 11, 2016 12:37:05 PM net.sourceforge.pmd.PMD removeBrokenRules
WARNING: Removed misconfigured rule: OldHadoopPackageImport cause: Missing xPath expression
Make sure your rule definition includes the property element and the value element inside it. For example:
message="Avoid importing old Hadoop mapred package, use mapreduce package instead"
<property name="xpath" description="XPath expression">
In AWS, my Docker-based ElasticBeanstalk apps were repeatedly removing & adding instances. This resulted in many “Adding instance ‘i-465f6382’ to your environment.” type messages. In the docker-events.log the message “Could not reach any registry endpoint” was repeated. I got the same message when running a “sudo docker pull ubuntu” manually on the EC2, even though network connectivity seemed ok.
As it turns out, Docker Hub has deprecated pulls from Docker clients on 1.5 and earlier. See https://blog.docker.com/2015/10/docker-hub-deprecation-1-5/ for more information.
Also, due to a bug in the ElasticBeanstalk console UI, I had to use the EB CLI command “eb config” to trigger an update of the platform.
Reason 347 why Google is bause: Google Ngram Viewer