DynamoDB Client can't get Credentials on Elastic Beanstalk - asp.net

I'm running a .net server on Amazon's Elastic Beanstalk and when I try to instantiate AmazonDynamoDBClient it fails. According to the information I've been following from these two pages:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.roles.apps.html
http://docs.aws.amazon.com/AWSSdkDocsNET/latest/DeveloperGuide/net-dg-roles.html
It should retrieve the credentials from the IAM role assigned to the EC2 instance.
It has the DynamoDBFullAccess template as a policy.
If I supply the credentials in the code itself through the web.config file it works, but only when debugging locally and not when deployed to elastic beanstalk.
Here is the code that breaks it:
AmazonDynamoDBClient client = new AmazonDynamoDBClient();
or
AmazonDynamoDBClient client = new AmazonDynamoDBClient(new InstanceProfileAWSCredentials());
Neither works. And I can't seem to retrieve crash logs from elastic beanstalk, so it is hard to debug. I'm pretty sure that I'm following the descriptions in those two links to the letter and am confused.
I've been trying to solve this for the better part of a day and would really appreciate some help. If there is any information missing, please let me know.
Thank you.

If you go to aws console and select ec2 view instances you will see the ec2 instance for your elastic beanstalk. The name of that instance will be either "Default-Environment" or whatever name you chose for your elastic beanstalk environment. Then you can ssh to that ec2 instance and view logs. For example my tomcat logs are stored at /var/log/tomcat7
You can also scp your credential file to your ec2 host just for debug and run the app. It should work because you already have it working on your local machine. but I guess this approach is not recommended and may has security concern.
This should at least get you started. may be an EC2 expert can help you solve the real problem :)

Related

Is it supported to create an integrated notebookVM when the workspace is configured to be in a VNET?

Trying to follow doc at secure your experiments but after configuring default workspace storage for VNET access, attempts to create integrated notebook VM fails with what looks like a storage access error.

Create Failed:
Failed to clone samples. Error details: Microsoft.WindowsAzure.Storage This request is not authorized to perform this operation.
thanks,
jim
We are working on adding virtual network support to NotebookVM.
Thanks

Logging with Serilog and Seq in azure .net api

I am working on an Web Api in .net. I am writing logs using Serilog and Seq. I made the configuration following the Seq official web site.
Basically placing this code in my startup.cs file:
var logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.Seq("http://localhost:5431/")
.CreateLogger();
builder.RegisterInstance<Serilog.ILogger>(logger);
I am logging to localhost so I am able to see my logs locally. So far so good.
I deployed my Api to azure and I want to continue logging on the same way. So I worked with the link https://docs.getseq.net/v3/docs/azure-installation and made the configuration. I had to create a virtual machine different from my ServicePlan and my Api. I installed Seq on that VM and run the Seq program on the url http://example.azurewebsites.net:5341/ so I made the change in my startup file too.
.WriteTo.Seq("http://example.azurewebsites.net:5341/")
I also had to create a Firewall Rule in the port 5341 in my VM and an Inbound Rule in the VM Network Security Rule.
I deployed again, at this point I would expect yo have Seq running on http://example.azurewebsites.net:5341/, but that is not certainly happening because I cannot find anything at the url neither from my PC browser nor from VM browser.
What am I missing? or In which configuration steps I have to check again?
In my experience so far, VMs live at *.cloudapp.net subdomains, not *.azurewebsites.net (which is IIRC the Azure App Service).

Deploying a Meteor app with Distelli

I've gotten pretty far into a deployment of my Meteor application on Distelli. Like, almost there. I've done everything as far as setting up the EC2 box, creating a user group [which didn't even seem necessary as I was able to SSH into the box with full rights without specifying my machine's IP], creating an elastic IP, successful build, and deployment to that box. But, I can't seem to check if Meteor is actually running (note: when I ssh in, there are active instances of Mongo and Node, so SOMETHING is running).
The problem has something to do with associating the elastic IP with my ROOT_URL and domain. I'm just not sure what to do at this step and can't seem to find any directions that are Meteor specific. Been using these guides:
https://www.distelli.com/docs/tutorials/how-to-set-up-aws-ec2
https://www.distelli.com/docs/tutorials/deploying-meteor-applications
http://gregblogs.com/tlt-associate-a-namecheap-domain-with-an-amazon-ec2-instance/
Recap: Distelli deployment is a success, but I get the follow error just before finishing:
Error: $ROOT_URL, if specified, must be an URL
I've set my ROOT_URL to my domain, and associated according to the previous guide. I can run traceroute on the IP, but like port 3000, so my inclination is the Meteor build is silently failing.
My manifest: https://gist.github.com/newswim/c642bd9a1cf136da73c3
I've noticed that when I point the CNAME record to my ec2 public DNS, NameCheap (aptly named) adds a . to the end of the record. Beyond that, I'm pretty much stumped.

Instance creation in Openstack Nova - Logfile

I need to keep track of Instance creation in openstack Nova.
That is I need to perform some special operations on creation of new instance in openstack.
So that I need to know where all the details are getting stored (In Log file).
Please some one guide me regarding the Log file for tracking instance creation or some other way to track the same.
As I am aware you have to look in the following services' log files
nova-scheduler (oftenly installed on controller node). This will show which 'server' will host the newly created Virtual Machine.
The logs of nova-compute service running on the host that the Virtual Machine was instantiated.
You can additionally check the logs of qemu and libvirt (again on the host that the Virtual Machine was instantiated)
Have in mind that the info you will find there, depends on the 'logging level' you have set in each service configuration files. For more information about how you can configure the OpenStack Components logging refer to the official documentation "Logging and Monitoring".

Fi-Ware cygnus configuration

I'm trying to configure the file cygnus.conf, but, I don't know the FQDM/IP of the Namenodes, hive sever and CKAN API endpoint.
I was search in the catalogue and forge, and I can't see anything about that.
thank you, and the best reggarts.
For the Namenode and the Hive server just use the same endpoint you used to setup your Cosmos account: http://cosmos.lab.fi-ware.org. Regarding CKAN, I'm not sure there is a public CKAN instance running in FI-LAB. Let me check it.

Resources