Execute cdklocal within AWS CodeBuild. The following error occurs: credentials have not been set up

My Current Project Setup

Currently, I am working on a TypeScript CDK project that deploys multiple lambdas to AWS using a CDK pipeline.

For testing purposes, I have integrated aws-cdk-local and localstack into my workflow. This allows me to run tests in a CodeBuild action within the CDK pipeline. The goal is to create a local DynamoDB stack for testing against before deploying the actual stack.

The Issue I Am Facing

While everything runs smoothly on my personal computer, I encountered an error in CodeBuild when executing cdklocal bootstrap and cdklocal deploy.

The Environment aws://000000000000/ap-southeast-1 failed bootstrapping: Error: Need to perform AWS calls for account 000000000000, but no credentials have been configured.

I even attempted setting mock credentials as shown in this screenshot, without much success.

Could it be that I overlooked something crucial?

Has anyone else managed to successfully run cdklocal from within AWS CodeBuild?

Thank you for any input or suggestions :)

For those interested, here is the link to my code repository here

Answer №1

The issue arose because I forgot to launch localstack prior to bootstrapping the project.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with TypeScript not recognizing node_modules symlink in Docker container

I'm currently working on containerizing an Express app in TypeScript. However, I am facing issues linking node_modules that have been installed outside the container. Even though a volume is mounted for development, I keep encountering errors in my ed ...

Is there a Node ORM that supports application-side joins?

Initially, I experimented with Loopback and found it to be a useful tool. However, one limitation I encountered is that it does not support relationships across multiple REST data services. Instead, Loopback makes a call to the initial data service and pas ...

The page has been updated following a refresh

I'm currently working on developing an Instagram-inspired platform using Angular 6, but I've run into a puzzling issue. When I refresh the page in my home component, everything reloads correctly and displays all my posts as expected. However, if ...

Issue with Cypress TypeScript: Unable to locate @angular/core module in my React application

I am currently in the process of updating my Cypress version from 9.70 to 10.7.0. Although I have fixed almost all the bugs, I have encountered a strange message stating that @angular/core or its corresponding type declarations cannot be found. My applica ...

Utilizing the 'create' function in sqlite each time I need to run a query

I've been diving into SQLite within the Ionic framework and have pieced together some code based on examples I've encountered. import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-a ...

Alias for function in TypeScript declaration file (.d.ts)

There is a function within a Node module that I am trying to document in a .d.ts file. This function has two aliases, config() and load() (check the source here). The function definition in the dotenv/index.d.ts file looks like this: export function confi ...

How long does it take to delete and recreate a cloudfront distribution using AWS CDK?

I am currently undergoing the process of migrating from the AWS CDK CloudfrontWebDistribution construct to the Distribution Construct. According to the documentation, the CDK will delete and recreate the distribution. I am curious about the total duration ...

Troubleshooting Issue with Chrome/chromium/Selenium Integration

Encountered an issue while attempting to build and start the application using "yarn start": ERROR:process_singleton_win.cc(465) Lock file cannot be created! Error code: 3 Discovered this error while working on a cloned electron project on a Windows x64 m ...

Mastering Interpolation in React with TypeScript is essential for creating dynamic and interactive UI components. By leveraging the

Incorporating and distributing CSS objects through ChakraUI presents a simple need. Given that everything is inline, it seems the main issue revolves around "& > div". However, one of the TypeScript (TS) errors highlights an unexpected flagging of ...

Retrieving the attribute key from a dynamically typed object

Having this specific interface structure: interface test { [key: string]: string } along with an object defined as follows: const obj: test ={ name: 'mda', telephone: '1234' } Attempting to utilize this object in a variab ...

Assistance needed with Angular 2 form for integrating backend features

Attempting to develop backend functions for a form within an Angular 2 project. While I successfully completed the front end portion, I am encountering difficulties with the backend implementation. The goal is to input data into the fields and upon hitting ...

Utilize the term "export const" twice when declaring variables to assign value

const foobar = { foo: 'hello', bar: this.foo }; The code isn't working as expected, returning "undefined". Any suggestions on how to properly access it? ...

What is the importance of using getters for functions involving Moment.js in vueJS and typescript?

weekOfMonth() calculates the current month and week within that month. <template> <h3>{{ weekOfMonth }}</h3> </template> <script lang="ts"> export default class HomeView extends Vue { const moment = require(& ...

The modal in Angular15 will automatically show the date decremented by 1 day whenever it is displayed

Every time I open the date field in a modal, it decrements by one day. Here is the associated typescript file: dob!: DatePipe; rescueDate!: string; dateAdded!: string; openEditPetMenu(template: TemplateRef<any>, petId: number, name: string, ...

You do not have permission to run AWS Route53Resolver AssociateResolverQueryLogConfig

When attempting to execute route53resolver:AssociateResolverQueryLogConfig using the AWS Lambda SDK, I encountered an access denied message. I have configured all the necessary policies in the role to address previous access denied errors, but this latest ...

Creating objects based on interfaces

After looking at this straightforward code: interface int1 { aa: string, bb: number, } const obj1:int1 = {} //#1 function fun(param_obj:int1) { //#2 } I am curious as to why the compiler throws an error: Type '{}' is missing the fol ...

What are the different ways to customize the appearance of embedded Power BI reports?

Recently, I developed a website that integrates PowerBI embedded features. For the mobile version of the site, I am working on adjusting the layout to center the reports with a margin-left style. Below are the configuration parameters I have set up: set ...

Why is the "typeof" function important in TypeScript member typings?

The definitions in the Electron typescript include an interface named MainInterface. This interface includes familiar members like app and autoUpdater, as well as less familiar ones such as BrowserView, BrowserWindow, and ClientRequest. One specific quest ...

Tips for handling numerous requests using Express.JS

I am currently working on an Angular 6 + Express.JS application and have encountered a problem. When multiple requests are made simultaneously, especially when there are more than 4 requests, all of them sometimes respond with a 404 error or get cancelled. ...

What is the best way to determine the type of a key when using direct key access and a generic interface in TypeScript?

I've been trying to make TypeScript understand the types in this specific scenario: There are 2 interfaces defined as follows: interface A { first: string; } type B = { second: string; } In addition, there is a generic interface with 2 mappers ...