Posts

Showing posts with the label aws-sdk

How to upload assets to AWS presignedurl from ClientSide javascrript

Image
Clash Royale CLAN TAG #URR8PPP How to upload assets to AWS presignedurl from ClientSide javascrript I am approching presignedUrl method to upload a large file . I call an API from my angular code to server side which gives me presignedUrl , then I need to upload an URL . I have some question on this 1) Is there need to AWS SDK on my Angular side ? I assume I dont need it , I just sent PUT request to unsigned URL and file uploadfileAWSS3old(e,f){ const formData = new FormData(); formData.append("data",JSON.stringify({name:"testname"})); formData.append("file", f.files[0]); let contentType = f.files["0"].type; const headers = new HttpHeaders( { 'Content-Type': contentType }); const req = new HttpRequest('PUT',this.URL,formData, { headers: headers, reportProgress: true, //This is required for track upload process }); console.log(req) this.http.r...

Querying DynamoDB GSI with a list of values

Image
Clash Royale CLAN TAG #URR8PPP Querying DynamoDB GSI with a list of values I have a table of "team memberships" with primary partition key of "team_id" , a primary sort key of "email" and a GSI with "email" as partition key. Given a list of emails I would like to find all the memberships for all the emails in the list in the most efficient way possible. I know that for a single email I can do the following: Membership membership = new Membership(); membership.setEmail(email.toLowerCase()); DynamoDBQueryExpression<Membership> expression = new DynamoDBQueryExpression<Membership>() .withHashKeyValues(membership) .withIndexName(EMAIL_INDEX) .withConsistentRead(false); return mapper.query(Membership.class, expression); which returns a list of memberships for the given email. (So for my list of emails, I could do the above for each email in the list, but I would like to know if it is possi...

aws billing information using aws java sdk

Image
Clash Royale CLAN TAG #URR8PPP aws billing information using aws java sdk I'm trying to get the billing information from aws for ec2 instances, s3 buckets and ebs volumes using java api. I want to create api that gives specific entity wise hourly billing reports. Is there any java api for getting the same? I couldn't find the same in aws java sdk api documentation. 5 Answers 5 There are no APIs to get AWS billing information. Instead what you can do is: For more information: See here I'm actually looking for any API that gives me usage with pricing. Is there any aws api that will provide me usage for EC2 instances, EBS volumes and S3 storage ? – bagui Dec 2 '14 at 10:35 Try getCostAndUsage in the Java SDK : doc...